Path: blob/21.2-virgl/src/broadcom/common/v3d_limits.h
4560 views
/*1* Copyright © 2019 Broadcom2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS20* IN THE SOFTWARE.21*/2223#ifndef V3D_LIMITS_H24#define V3D_LIMITS_H2526/* Number of channels a QPU thread executes in parallel. Also known as27* gl_SubGroupSizeARB.28*/29#define V3D_CHANNELS 163031#define V3D_MAX_FS_INPUTS 6432#define V3D_MAX_GS_INPUTS 6433#define V3D_MAX_VS_INPUTS 6434#define V3D_MAX_ANY_STAGE_INPUTS MAX3(V3D_MAX_VS_INPUTS, \35V3D_MAX_GS_INPUTS, \36V3D_MAX_FS_INPUTS)3738/* For now we need to maintain a different limits for OpenGL and Vulkan due39* some OpenGL CTS tests hitting register allocation when trying to use all40* the texture available.41*42* FIXME: nir_schedule should be able to handle that. When fixed it would be43* simpler to keep just one limit44*/45#define V3D_VULKAN_MAX_TEXTURE_SAMPLERS 2446#define V3D_OPENGL_MAX_TEXTURE_SAMPLERS 164748/* Not specifically a hardware limit, just coordination between compiler and49* driver.50*/51#define V3D_MAX_TEXTURE_SAMPLERS MAX2(V3D_VULKAN_MAX_TEXTURE_SAMPLERS, \52V3D_OPENGL_MAX_TEXTURE_SAMPLERS)5354/* The HW can do 16384 (15), but we run into hangs when we expose that. */55#define V3D_MAX_MIP_LEVELS 135657#define V3D_MAX_SAMPLES 45859#define V3D_MAX_DRAW_BUFFERS 46061#define V3D_MAX_POINT_SIZE 512.0f62#define V3D_MAX_LINE_WIDTH 326364#define V3D_MAX_BUFFER_RANGE (1 << 27)6566#endif /* V3D_LIMITS_H */676869