This signal doesn't terminate the program now, it terminates the program
soon. So you have to actually validate the code in the instruction.
case QPU_SIG_COLOR_LOAD:
case QPU_SIG_LOAD_TMU0:
case QPU_SIG_LOAD_TMU1:
+ case QPU_SIG_PROG_END:
if (!check_instruction_writes(inst, validated_shader,
&validation_state)) {
DRM_ERROR("Bad write at ip %d\n", ip);
if (!check_instruction_reads(inst, validated_shader))
goto fail;
+ if (sig == QPU_SIG_PROG_END) {
+ found_shader_end = true;
+ shader_end_ip = ip;
+ }
+
break;
case QPU_SIG_LOAD_IMM:
}
break;
- case QPU_SIG_PROG_END:
- found_shader_end = true;
- shader_end_ip = ip;
- break;
-
default:
DRM_ERROR("Unsupported QPU signal %d at "
"instruction %d\n", sig, ip);