v3d: Drop maximum number of texture units down to 16.
authorEric Anholt <eric@anholt.net>
Thu, 17 Jan 2019 22:28:10 +0000 (14:28 -0800)
committerEric Anholt <eric@anholt.net>
Sun, 27 Jan 2019 16:30:03 +0000 (08:30 -0800)
This is the GLES 3.2 minmax, and also what the closed source driver does.
Avoids hitting OOMs in the CTS's
dEQP-GLES3.functional.texture.units.all_units.only_cube.1.

src/broadcom/common/v3d_limits.h
src/gallium/drivers/v3d/v3d_context.h

index 367806dbe48d70036f52ebe061712c49c2ad758c..ee7a3e6bc00ea5ae3a5efbd97c167195bc38f5fd 100644 (file)
@@ -30,7 +30,7 @@
 /* Not specifically a hardware limit, just coordination between compiler and
  * driver.
  */
-#define V3D_MAX_TEXTURE_SAMPLERS 32
+#define V3D_MAX_TEXTURE_SAMPLERS 16
 
 #define V3D_MAX_MIP_LEVELS 12
 
index 3ec4940b6482baef3cf6c41c649187786770b9ea..ef873237c0c1352d05f9d141dec8e22fe1b2466b 100644 (file)
@@ -118,11 +118,11 @@ struct v3d_sampler_state {
 };
 
 struct v3d_texture_stateobj {
-        struct pipe_sampler_view *textures[PIPE_MAX_SAMPLERS];
+        struct pipe_sampler_view *textures[V3D_MAX_TEXTURE_SAMPLERS];
         unsigned num_textures;
-        struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
+        struct pipe_sampler_state *samplers[V3D_MAX_TEXTURE_SAMPLERS];
         unsigned num_samplers;
-        struct v3d_cl_reloc texture_state[PIPE_MAX_SAMPLERS];
+        struct v3d_cl_reloc texture_state[V3D_MAX_TEXTURE_SAMPLERS];
 };
 
 struct v3d_shader_uniform_info {