i965: Retype atomics to UD in Gen8 code generation.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 12 Jul 2014 00:07:03 +0000 (17:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Aug 2014 20:39:25 +0000 (13:39 -0700)
Kind of a moot point since we're deleting Gen8 code generation, but
this at least helps make it match the Gen4-7 code.  It's probably more
reasonable than using float.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp

index f4aae67ae665ff4be87faee33cf892d30b9f1a35..b7e7cf91b3f4eedbf4fd306711860d9ef003d034 100644 (file)
@@ -841,7 +841,8 @@ gen8_fs_generator::generate_untyped_atomic(fs_inst *ir,
 
    gen8_instruction *inst = next_inst(BRW_OPCODE_SEND);
    gen8_set_dst(brw, inst, retype(dst, BRW_REGISTER_TYPE_UD));
-   gen8_set_src0(brw, inst, brw_message_reg(ir->base_mrf));
+   gen8_set_src0(brw, inst, retype(brw_message_reg(ir->base_mrf),
+                                   BRW_REGISTER_TYPE_UD));
    gen8_set_dp_message(brw, inst, HSW_SFID_DATAPORT_DATA_CACHE_1,
                        surf_index.dw1.ud,
                        HSW_DATAPORT_DC_PORT1_UNTYPED_ATOMIC_OP,
@@ -867,7 +868,8 @@ gen8_fs_generator::generate_untyped_surface_read(fs_inst *ir,
 
    gen8_instruction *inst = next_inst(BRW_OPCODE_SEND);
    gen8_set_dst(brw, inst, retype(dst, BRW_REGISTER_TYPE_UD));
-   gen8_set_src0(brw, inst, brw_message_reg(ir->base_mrf));
+   gen8_set_src0(brw, inst, retype(brw_message_reg(ir->base_mrf),
+                                   BRW_REGISTER_TYPE_UD));
    gen8_set_dp_message(brw, inst, HSW_SFID_DATAPORT_DATA_CACHE_1,
                        surf_index.dw1.ud,
                        HSW_DATAPORT_DC_PORT1_UNTYPED_SURFACE_READ,
index cbac89d6f784ffdc8886ef6c5796a847cc0398cb..3a81cf242673c9fc05cf34bf621be34fb5325589 100644 (file)
@@ -480,7 +480,8 @@ gen8_vec4_generator::generate_untyped_atomic(vec4_instruction *ir,
 
    gen8_instruction *inst = next_inst(BRW_OPCODE_SEND);
    gen8_set_dst(brw, inst, retype(dst, BRW_REGISTER_TYPE_UD));
-   gen8_set_src0(brw, inst, brw_message_reg(ir->base_mrf));
+   gen8_set_src0(brw, inst, retype(brw_message_reg(ir->base_mrf),
+                                   BRW_REGISTER_TYPE_UD));
    gen8_set_dp_message(brw, inst, HSW_SFID_DATAPORT_DATA_CACHE_1,
                        surf_index.dw1.ud,
                        HSW_DATAPORT_DC_PORT1_UNTYPED_ATOMIC_OP_SIMD4X2,
@@ -505,7 +506,8 @@ gen8_vec4_generator::generate_untyped_surface_read(vec4_instruction *ir,
 
    gen8_instruction *inst = next_inst(BRW_OPCODE_SEND);
    gen8_set_dst(brw, inst, retype(dst, BRW_REGISTER_TYPE_UD));
-   gen8_set_src0(brw, inst, brw_message_reg(ir->base_mrf));
+   gen8_set_src0(brw, inst, retype(brw_message_reg(ir->base_mrf),
+                                   BRW_REGISTER_TYPE_UD));
    gen8_set_dp_message(brw, inst, HSW_SFID_DATAPORT_DATA_CACHE_1,
                        surf_index.dw1.ud,
                        HSW_DATAPORT_DC_PORT1_UNTYPED_SURFACE_READ,