v3d: stop using a smaller texture limit in OpenGL
The compiler has improved significantly since we found this issue and this is no longer required. Notice that because we are increasing the number of samplers supported beyond what we can loop unroll (currently capped at 16), some piglit tests that test the maximum number of samplers supported start to fail because they use indirect indexing on a sampler array and we don't support that (previously the indirect indexing was removed by loop unrolling). This is a bug in tests which the GLSL linker detects, failing to compile the shaders. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17509>
This commit is contained in:
parent
9b74f4218f
commit
8d8491df5e
|
@ -353,3 +353,11 @@ spec@!opengl 1.0@depth-clear-precision-check@depth24,Fail
|
|||
# https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3711
|
||||
dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_1.multi_draw_barriers,Fail
|
||||
dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_4.multi_draw_barriers,Fail
|
||||
|
||||
# These fail because the shaders use indirect indexing on samplers which we
|
||||
# don't support (the GLSL linker fails to link the shaders because of this).
|
||||
# If loop unrolling kicks-in for these tests it removes the indirect indexing
|
||||
# and the tests pass, but this would just be working around an issue in the
|
||||
# tests.
|
||||
spec@!opengl 2.0@max-samplers,Fail
|
||||
spec@!opengl 2.0@max-samplers border,Fail
|
||||
|
|
|
@ -36,21 +36,7 @@
|
|||
V3D_MAX_GS_INPUTS, \
|
||||
V3D_MAX_FS_INPUTS)
|
||||
|
||||
/* For now we need to maintain a different limits for OpenGL and Vulkan due
|
||||
* some OpenGL CTS tests hitting register allocation when trying to use all
|
||||
* the texture available.
|
||||
*
|
||||
* FIXME: nir_schedule should be able to handle that. When fixed it would be
|
||||
* simpler to keep just one limit
|
||||
*/
|
||||
#define V3D_VULKAN_MAX_TEXTURE_SAMPLERS 24
|
||||
#define V3D_OPENGL_MAX_TEXTURE_SAMPLERS 16
|
||||
|
||||
/* Not specifically a hardware limit, just coordination between compiler and
|
||||
* driver.
|
||||
*/
|
||||
#define V3D_MAX_TEXTURE_SAMPLERS MAX2(V3D_VULKAN_MAX_TEXTURE_SAMPLERS, \
|
||||
V3D_OPENGL_MAX_TEXTURE_SAMPLERS)
|
||||
#define V3D_MAX_TEXTURE_SAMPLERS 24
|
||||
|
||||
#define V3D_MAX_SAMPLES 4
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
|||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
|
||||
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
|
||||
return V3D_OPENGL_MAX_TEXTURE_SAMPLERS;
|
||||
return V3D_MAX_TEXTURE_SAMPLERS;
|
||||
|
||||
case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
|
||||
if (screen->has_cache_flush) {
|
||||
|
|
Loading…
Reference in New Issue