Mesa (master): i965: Don't allocate uniform space for samplers
Timothy Arceri
tarceri at kemper.freedesktop.org
Sun Apr 30 21:54:32 UTC 2017
Module: Mesa
Branch: master
Commit: de8e01698fb745e6f91c22470393777093c2c2ee
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=de8e01698fb745e6f91c22470393777093c2c2ee
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Sun Apr 30 12:12:35 2017 +1000
i965: Don't allocate uniform space for samplers
Samplers are encoded into the instruction word, so there's no need to
make space in the uniform file.
Previously matrix_columns and vector_elements were set to 0, making this
else case a no-op. Commit 75a31a20af26 changed that, causing malloc
corruption in thousands of tests on i965.
Fixes: 75a31a20af26 ("glsl: set vector_elements to 1 for samplers")
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100871
---
src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp b/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
index f35e8f88dd..f0bccac14e 100644
--- a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
+++ b/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
@@ -135,7 +135,7 @@ brw_nir_setup_glsl_uniform(gl_shader_stage stage, nir_variable *var,
struct gl_uniform_storage *storage =
&prog->sh.data->UniformStorage[u];
- if (storage->builtin)
+ if (storage->builtin || storage->type->is_sampler())
continue;
if (strncmp(var->name, storage->name, namelen) != 0 ||
More information about the mesa-commit
mailing list