diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2015-11-13 13:29:16 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2015-11-22 00:03:21 -0800 |
commit | 86fc97da0627cd4a81c2e190d2e157571eead111 (patch) | |
tree | 1459e7de9632317d1668c1359617505b75ab9aad /src/mesa/drivers/dri/i965/brw_gs.c | |
parent | 4cff16bc3a84569da05e672c8226931678aa62c0 (diff) | |
download | external_mesa3d-86fc97da0627cd4a81c2e190d2e157571eead111.zip external_mesa3d-86fc97da0627cd4a81c2e190d2e157571eead111.tar.gz external_mesa3d-86fc97da0627cd4a81c2e190d2e157571eead111.tar.bz2 |
i965: Fix num_uniforms count for scalar GS.
I noticed that brw_vs.c does this.
I believe the point is that nir->num_uniforms is either counted in
scalar components (in scalar mode), or vec4 slots (in vector mode).
But we want param_count to be in scalar components regardless, so
we have to scale up in vector mode.
We don't have to scale up in scalar mode, though.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index ad5b242..149b43b 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -75,7 +75,9 @@ brw_codegen_gs_prog(struct brw_context *brw, * every uniform is a float which gets padded to the size of a vec4. */ struct gl_shader *gs = prog->_LinkedShaders[MESA_SHADER_GEOMETRY]; - int param_count = gp->program.Base.nir->num_uniforms * 4; + int param_count = gp->program.Base.nir->num_uniforms; + if (!compiler->scalar_stage[MESA_SHADER_GEOMETRY]) + param_count *= 4; prog_data.base.base.param = rzalloc_array(NULL, const gl_constant_value *, param_count); |