mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
i965: Make pixel_xy results UW.
There is a restriction on the destination of an operation involving a vector immediate being 128-bit aligned and the destination horizontal stride being equivalent to 2 bytes. Fixes bad pixel_x results from gl_FragCoord, where each pair had the same value.
This commit is contained in:
parent
c47b289972
commit
32b84ef4ca
1 changed files with 2 additions and 0 deletions
|
|
@ -1211,6 +1211,8 @@ fs_visitor::emit_interpolation()
|
|||
this->current_annotation = "compute pixel centers";
|
||||
this->pixel_x = fs_reg(this, glsl_type::uint_type);
|
||||
this->pixel_y = fs_reg(this, glsl_type::uint_type);
|
||||
this->pixel_x.type = BRW_REGISTER_TYPE_UW;
|
||||
this->pixel_y.type = BRW_REGISTER_TYPE_UW;
|
||||
emit(fs_inst(BRW_OPCODE_ADD,
|
||||
this->pixel_x,
|
||||
fs_reg(stride(suboffset(g1_uw, 4), 2, 4, 0)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue