aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2015-04-22 21:10:43 +0300
committerFrancisco Jerez <[email protected]>2015-05-04 15:05:20 +0300
commit0519a6259b0e6b83eaeafdf0ed30a67713c4b6ed (patch)
treeba1b421edbea8239d9808ee03542b1f91fd2a682 /src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
parent2f1c16df3e997771bcedb60ae7f16a21c4c60144 (diff)
i965: Simplify generator code for untyped surface messages.
The generate_untyped_*() methods do nothing useful other than calling the corresponding function from brw_eu_emit.c. The calls to brw_mark_surface_used() will go away too in a future commit. Reviewed-by: Topi Pohjolainen <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_generator.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_generator.cpp43
1 files changed, 9 insertions, 34 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index b9ab0123b48..de7e06c7617 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1111,38 +1111,6 @@ vec4_generator::generate_set_simd4x2_header_gen9(vec4_instruction *inst,
}
void
-vec4_generator::generate_untyped_atomic(vec4_instruction *inst,
- struct brw_reg dst,
- struct brw_reg atomic_op,
- struct brw_reg surf_index)
-{
- assert(atomic_op.file == BRW_IMMEDIATE_VALUE &&
- atomic_op.type == BRW_REGISTER_TYPE_UD &&
- surf_index.file == BRW_IMMEDIATE_VALUE &&
- surf_index.type == BRW_REGISTER_TYPE_UD);
-
- brw_untyped_atomic(p, dst, brw_message_reg(inst->base_mrf),
- surf_index, atomic_op.dw1.ud,
- inst->mlen, true);
-
- brw_mark_surface_used(&prog_data->base, surf_index.dw1.ud);
-}
-
-void
-vec4_generator::generate_untyped_surface_read(vec4_instruction *inst,
- struct brw_reg dst,
- struct brw_reg surf_index)
-{
- assert(surf_index.file == BRW_IMMEDIATE_VALUE &&
- surf_index.type == BRW_REGISTER_TYPE_UD);
-
- brw_untyped_surface_read(p, dst, brw_message_reg(inst->base_mrf),
- surf_index, inst->mlen, 1);
-
- brw_mark_surface_used(&prog_data->base, surf_index.dw1.ud);
-}
-
-void
vec4_generator::generate_code(const cfg_t *cfg)
{
struct annotation_info annotation;
@@ -1501,11 +1469,18 @@ vec4_generator::generate_code(const cfg_t *cfg)
break;
case SHADER_OPCODE_UNTYPED_ATOMIC:
- generate_untyped_atomic(inst, dst, src[0], src[1]);
+ assert(src[0].file == BRW_IMMEDIATE_VALUE &&
+ src[1].file == BRW_IMMEDIATE_VALUE);
+ brw_untyped_atomic(p, dst, brw_message_reg(inst->base_mrf),
+ src[1], src[0].dw1.ud, inst->mlen, true);
+ brw_mark_surface_used(&prog_data->base, src[1].dw1.ud);
break;
case SHADER_OPCODE_UNTYPED_SURFACE_READ:
- generate_untyped_surface_read(inst, dst, src[0]);
+ assert(src[0].file == BRW_IMMEDIATE_VALUE);
+ brw_untyped_surface_read(p, dst, brw_message_reg(inst->base_mrf),
+ src[0], inst->mlen, 1);
+ brw_mark_surface_used(&prog_data->base, src[0].dw1.ud);
break;
case VS_OPCODE_UNPACK_FLAGS_SIMD4X2: