From: Kenneth Graunke Date: Sat, 12 Jul 2014 00:07:03 +0000 (-0700) Subject: i965: Retype atomics to UD in Gen8 code generation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db6ffa29c84178642889db237de1cfa75cf85885;p=mesa.git i965: Retype atomics to UD in Gen8 code generation. 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 Reviewed-by: Chris Forbes Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp index f4aae67ae66..b7e7cf91b3f 100644 --- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp @@ -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, diff --git a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp index cbac89d6f78..3a81cf24267 100644 --- a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp @@ -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,