diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-09-11 22:07:41 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-09-12 16:51:52 -0700 |
commit | eeba3c94b10e6ec5dfa7fbef0c98067f74ad838f (patch) | |
tree | 5b314753a0e334f0204cff64ebfc601659afd7f5 /src | |
parent | 0eeec2871dadf3810143efa9f91495165749be02 (diff) | |
download | mesa-eeba3c94b10e6ec5dfa7fbef0c98067f74ad838f.tar.gz mesa-eeba3c94b10e6ec5dfa7fbef0c98067f74ad838f.tar.bz2 mesa-eeba3c94b10e6ec5dfa7fbef0c98067f74ad838f.zip |
i965/vec4: Make type_size() return 0 for samplers.
The FS backend has always used 0, and the VS backend has always used 1.
I think 1 is just working around other problems, and is incorrect.
Samplers are baked in; nothing uses the UNIFORM register we would
create, and we shouldn't upload any constant values for them.
Fixes ES3-CTS.shaders.struct.uniform.sampler_array_vertex.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 7865026c04f6cc36dc81f993bc32ddda2806ecb5)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index fe8a0dfba46..4ed1e8cd0a6 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -588,10 +588,10 @@ type_size(const struct glsl_type *type) } return size; case GLSL_TYPE_SAMPLER: - /* Samplers take up one slot in UNIFORMS[], but they're baked in - * at link time. + /* Samplers take up no register space, since they're baked in at + * link time. */ - return 1; + return 0; case GLSL_TYPE_ATOMIC_UINT: return 0; case GLSL_TYPE_IMAGE: |