Mesa (master): ir_to_mesa: Propagate initial values in _mesa_associate_uniform_storage
Ian Romanick
idr at kemper.freedesktop.org
Wed May 23 18:43:52 UTC 2012
Module: Mesa
Branch: master
Commit: c343b980d615bb3a159e0adc6e7597f2f9865323
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c343b980d615bb3a159e0adc6e7597f2f9865323
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Mon Apr 9 11:19:24 2012 -0700
ir_to_mesa: Propagate initial values in _mesa_associate_uniform_storage
The linker may have set initial values for uniforms. Propagate these
values to the driver's backing storage when it is first associated.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/program/ir_to_mesa.cpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 840648e..b8e2560 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2526,6 +2526,15 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
4 * sizeof(float),
format,
¶ms->ParameterValues[i]);
+
+ /* After attaching the driver's storage to the uniform, propagate any
+ * data from the linker's backing store. This will cause values from
+ * initializers in the source code to be copied over.
+ */
+ _mesa_propagate_uniforms_to_driver_storage(storage,
+ 0,
+ MAX2(1, storage->array_elements));
+
last_location = location;
}
}
More information about the mesa-commit
mailing list