mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
i965/fs/generator: Change a comment as per jordan's suggestion
This commit is contained in:
parent
6be517b20e
commit
5d1c2736b6
1 changed files with 4 additions and 12 deletions
|
|
@ -916,18 +916,10 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
|
|||
brw_imm_ud(inst->offset));
|
||||
} else if (stage != MESA_SHADER_VERTEX &&
|
||||
stage != MESA_SHADER_FRAGMENT) {
|
||||
/* In the vertex and fragment stages, the hardware is nice to us
|
||||
* and leaves g0.2 zerod out for us so we can use it for headers.
|
||||
* However, in compute, geometry, and tessellation stages, the
|
||||
* hardware is not so nice. In particular, for compute shaders on
|
||||
* BDW, the hardware places some debug bits in 23:15. As it
|
||||
* happens, bit 15 is the alpha channel mask. This means that if
|
||||
* you use a texturing instruction with a header in a compute
|
||||
* shader, you may randomly get the alpha channel randomly
|
||||
* disabled. Since channel masks affect the return length of the
|
||||
* sampler message, this can lead the GPU to expect a different
|
||||
* mlen to the one you specified in the shader (probably 4 or 8)
|
||||
* and this, in turn, hangs your GPU.
|
||||
/* The vertex and fragment stages have g0.2 set to 0, so
|
||||
* header0.2 is 0 when g0 is copied. Other stages may not, so we
|
||||
* must set it to 0 to avoid setting undesirable bits in the
|
||||
* message.
|
||||
*/
|
||||
brw_MOV(p, get_element_ud(header_reg, 2), brw_imm_ud(0));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue