summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_assemble.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-02-15 15:51:01 +0000
committerBrian Paul <[email protected]>2006-02-15 15:51:01 +0000
commita584e846d435070e67aff904fb79cfc9a6d7d05e (patch)
tree0518ce5ff48736d064c7f84aea87070b5e69a1af /src/mesa/shader/slang/slang_assemble.c
parentdd02edf381a6bc68bad0cb881548db079aa706bb (diff)
Fix a few warnings:
- nested comments (use #if 0 / #endif instead) - missing default clause in switch statements - use of possibly undefined variables
Diffstat (limited to 'src/mesa/shader/slang/slang_assemble.c')
-rw-r--r--src/mesa/shader/slang/slang_assemble.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c
index 698b3bf747b..30a80b7f3de 100644
--- a/src/mesa/shader/slang/slang_assemble.c
+++ b/src/mesa/shader/slang/slang_assemble.c
@@ -474,6 +474,9 @@ static int dereference_aggregate (slang_assembly_file *file, const slang_storage
case slang_stor_float:
ty = slang_asm_float_deref;
break;
+ default:
+ _mesa_problem(NULL, "Unexpected arr->type in dereference_aggregate");
+ ty = slang_asm_none;
}
if (!PUSH (file, ty))
return 0;
@@ -936,15 +939,17 @@ static int handle_field (slang_assembly_typeinfo *tia, slang_assembly_typeinfo *
{
if (reference)
{
- /*if (tia->swz.num_components == 1)
+#if 0
+ if (tia->swz.num_components == 1)
{
/* simple case - adjust the vector's address to point to the selected component */
- /* if (!PLAB (file, slang_asm_addr_push, tia->swz.swizzle[0] * 4))
+ if (!PLAB (file, slang_asm_addr_push, tia->swz.swizzle[0] * 4))
return 0;
if (!PUSH (file, slang_asm_addr_add))
return 0;
}
- else*/
+ else
+#endif
{
/* two or more vector components are being referenced - the so-called write mask
* must be passed to the upper operations and applied when assigning value