diff options
author | Timothy Arceri <[email protected]> | 2015-09-30 11:00:02 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-10-05 10:53:24 +1100 |
commit | 763cd8c080353482cb41da578cb3d6f7892a0c9f (patch) | |
tree | dff9ba9c0e6a4ebc0e706d578fe5313bc1cbda4f /src/mesa/program/sampler.cpp | |
parent | b85757bc72350df609f50e000512bc80d07f1497 (diff) |
glsl: reduce memory footprint of uniform_storage struct
The uniform will only be of a single type so store the data for
opaque types in a single array.
Cc: Francisco Jerez <[email protected]>
Cc: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/program/sampler.cpp')
-rw-r--r-- | src/mesa/program/sampler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp index b1168fdade8..1198a3c45f1 100644 --- a/src/mesa/program/sampler.cpp +++ b/src/mesa/program/sampler.cpp @@ -119,7 +119,7 @@ _mesa_get_sampler_uniform_value(class ir_dereference *sampler, return 0; } - if (!shader_program->UniformStorage[location].sampler[shader].active) { + if (!shader_program->UniformStorage[location].opaque[shader].active) { assert(0 && "cannot return a sampler"); linker_error(shader_program, "cannot return a sampler named %s, because it is not " @@ -128,7 +128,7 @@ _mesa_get_sampler_uniform_value(class ir_dereference *sampler, return 0; } - return shader_program->UniformStorage[location].sampler[shader].index + + return shader_program->UniformStorage[location].opaque[shader].index + getname.offset; } |