Mesa (master): mesa/program: Associate uniform storage without using names
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 10 22:07:03 UTC 2019
Module: Mesa
Branch: master
Commit: d40978f396523ea1b719c0999b0650b1cb4ebc54
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d40978f396523ea1b719c0999b0650b1cb4ebc54
Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date: Wed Aug 21 12:16:29 2019 -0700
mesa/program: Associate uniform storage without using names
Use the new UniformStorageIndex field in Parameter instead. This
mechanism was added so we could match those in the SPIR-V case, where
names are optional.
v2: Use UniformStorageIndex for all cases. (Timothy)
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/mesa/program/ir_to_mesa.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 30e8606b253..777fd168c7e 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2536,13 +2536,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
if (params->Parameters[i].Type != PROGRAM_UNIFORM)
continue;
- unsigned location;
- const bool found =
- shader_program->UniformHash->get(location, params->Parameters[i].Name);
- assert(found);
-
- if (!found)
- continue;
+ unsigned location = params->Parameters[i].UniformStorageIndex;
struct gl_uniform_storage *storage =
&shader_program->data->UniformStorage[location];
More information about the mesa-commit
mailing list