mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
i965/vec4: implement HW workaround for align16 double to float conversion
From the BDW PRM, Workarounds chapter:
"DF->f format conversion for Align16 has wrong emask calculation when
source is immediate."
Notice that Broadwell and later are strictly scalar at the moment though, so
this is not really necessary.
v2: Instead of moving the immediate to a vgrf and converting from there, just
convert the double immediate to float in the compiler and move the result
to the destination (Matt)
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
bfc1f0f017
commit
4b22576234
1 changed files with 11 additions and 0 deletions
|
|
@ -1071,6 +1071,17 @@ vec4_visitor::emit_conversion_from_double(dst_reg dst, src_reg src,
|
|||
bool saturate,
|
||||
brw_reg_type single_type)
|
||||
{
|
||||
/* BDW PRM vol 15 - workarounds:
|
||||
* DF->f format conversion for Align16 has wrong emask calculation when
|
||||
* source is immediate.
|
||||
*/
|
||||
if (devinfo->gen == 8 && single_type == BRW_REGISTER_TYPE_F &&
|
||||
src.file == BRW_IMMEDIATE_VALUE) {
|
||||
vec4_instruction *inst = emit(MOV(dst, brw_imm_f(src.df)));
|
||||
inst->saturate = saturate;
|
||||
return;
|
||||
}
|
||||
|
||||
dst_reg temp = dst_reg(this, glsl_type::dvec4_type);
|
||||
emit(MOV(temp, src));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue