summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index c6d11fed06..1cdc8c6411 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -175,6 +175,14 @@ static GLboolean brwProgramStringNotify( GLcontext *ctx,
"the end of the function to work around it.\n");
return GL_FALSE;
}
+
+ if (prog->Instructions[i].Opcode == OPCODE_RET) {
+ shader_error(ctx, prog,
+ "i965 driver doesn't yet support \"return\" "
+ "from main().\n");
+ return GL_FALSE;
+ }
+
if (prog->Instructions[i].DstReg.RelAddr &&
prog->Instructions[i].DstReg.File == PROGRAM_INPUT) {
shader_error(ctx, prog,