i965: Mark URB reads as volatile.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 9 Apr 2016 01:49:22 +0000 (18:49 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 25 Apr 2016 18:45:15 +0000 (11:45 -0700)
They can be affected by URB writes.

In the upcoming scalar TCS backend, this prevents read-modify-write
cycles from being broken by CSE removing reads.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/mesa/drivers/dri/i965/brw_shader.cpp

index b3aade125d7d3bfa5f95bc83ee8cf025748bd31c..d9e654c4d4f3e9c070abb29f824d105a01f279ab 100644 (file)
@@ -961,6 +961,9 @@ backend_instruction::is_volatile() const
    case SHADER_OPCODE_UNTYPED_SURFACE_READ_LOGICAL:
    case SHADER_OPCODE_TYPED_SURFACE_READ:
    case SHADER_OPCODE_TYPED_SURFACE_READ_LOGICAL:
+   case SHADER_OPCODE_URB_READ_SIMD8:
+   case SHADER_OPCODE_URB_READ_SIMD8_PER_SLOT:
+   case VEC4_OPCODE_URB_READ:
       return true;
    default:
       return false;