diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_generator.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp index e5fa3d2d25f..0e1214d82b9 100644 --- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp @@ -920,10 +920,10 @@ gen8_fs_generator::generate_code(exec_list *instructions) break; case BRW_OPCODE_F32TO16: - F32TO16(dst, src[0]); + MOV(retype(dst, BRW_REGISTER_TYPE_HF), src[0]); break; case BRW_OPCODE_F16TO32: - F16TO32(dst, src[0]); + MOV(dst, retype(src[0], BRW_REGISTER_TYPE_HF)); break; case BRW_OPCODE_CMP: diff --git a/src/mesa/drivers/dri/i965/gen8_generator.cpp b/src/mesa/drivers/dri/i965/gen8_generator.cpp index 1e2ac09bfd5..ca38af61072 100644 --- a/src/mesa/drivers/dri/i965/gen8_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_generator.cpp @@ -154,8 +154,6 @@ ALU2(ASR) ALU3(BFE) ALU2(BFI1) ALU3(BFI2) -ALU1(F32TO16) -ALU1(F16TO32) ALU1(BFREV) ALU1(CBIT) ALU2_ACCUMULATE(ADDC) diff --git a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp index 7ed5d2a4b8c..7f6b2094e79 100644 --- a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp @@ -586,11 +586,13 @@ gen8_vec4_generator::generate_vec4_instruction(vec4_instruction *instruction, break; case BRW_OPCODE_F32TO16: - F32TO16(dst, src[0]); + /* Emulate the Gen7 zeroing bug. */ + MOV(retype(dst, BRW_REGISTER_TYPE_UD), brw_imm_ud(0u)); + MOV(retype(dst, BRW_REGISTER_TYPE_HF), src[0]); break; case BRW_OPCODE_F16TO32: - F16TO32(dst, src[0]); + MOV(dst, retype(src[0], BRW_REGISTER_TYPE_HF)); break; case BRW_OPCODE_LRP: |