mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 14:10:25 +01:00
i965/fs: Gen4: Zero out extra coordinates when using shadow compare
Fixes broken rendering if these MRFs contained anything other than zero.
NOTE: This is a candidate for stable branches.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit f35dea05b1)
This commit is contained in:
parent
ab9322534c
commit
c3de1eea7f
1 changed files with 7 additions and 1 deletions
|
|
@ -868,7 +868,13 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate,
|
|||
emit(MOV(fs_reg(MRF, base_mrf + mlen + i), coordinate));
|
||||
coordinate.reg_offset++;
|
||||
}
|
||||
/* gen4's SIMD8 sampler always has the slots for u,v,r present. */
|
||||
|
||||
/* gen4's SIMD8 sampler always has the slots for u,v,r present.
|
||||
* the unused slots must be zeroed.
|
||||
*/
|
||||
for (int i = ir->coordinate->type->vector_elements; i < 3; i++) {
|
||||
emit(MOV(fs_reg(MRF, base_mrf + mlen + i), fs_reg(0.0f)));
|
||||
}
|
||||
mlen += 3;
|
||||
|
||||
if (ir->op == ir_tex) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue