projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
524c333
)
comment about fixing uniform structs
author
Brian
<brian@yutani.localnet.net>
Fri, 11 May 2007 21:50:33 +0000
(15:50 -0600)
committer
Brian
<brian@yutani.localnet.net>
Mon, 14 May 2007 15:38:23 +0000
(09:38 -0600)
src/mesa/shader/slang/slang_codegen.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_codegen.c
b/src/mesa/shader/slang/slang_codegen.c
index 60ffc48f54bc81f6d9ba508743afd5b9c237bdeb..02260d3422e516713d449f22a1f27dc6368401bd 100644
(file)
--- a/
src/mesa/shader/slang/slang_codegen.c
+++ b/
src/mesa/shader/slang/slang_codegen.c
@@
-2866,6
+2866,19
@@
_slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
if (datatype == GL_NONE) {
if (var->type.specifier.type == SLANG_SPEC_STRUCT) {
_mesa_problem(NULL, "user-declared uniform structs not supported yet");
+ /* XXX what we need to do is unroll the struct into its
+ * basic types, creating a uniform variable for each.
+ * For example:
+ * struct foo {
+ * vec3 a;
+ * vec4 b;
+ * };
+ * uniform foo f;
+ *
+ * Should produce uniforms:
+ * "f.a" (GL_FLOAT_VEC3)
+ * "f.b" (GL_FLOAT_VEC4)
+ */
}
else {
slang_info_log_error(A->log,