mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
intel: compiler: vec4: add missing default 0 lod
We set a similar default value for LOD in the fs backend for TXS/TXL.
Without this we end up generating invalid MOV with a null src.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "17.2 17.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit d3acc240d0)
This commit is contained in:
parent
cb72969d8b
commit
3315bb4f08
1 changed files with 9 additions and 0 deletions
|
|
@ -2227,6 +2227,15 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
|
|||
}
|
||||
}
|
||||
|
||||
/* TXS and TXL require a LOD but not everything we implement using those
|
||||
* two opcodes provides one. Provide a default LOD of 0.
|
||||
*/
|
||||
if ((instr->op == nir_texop_txs ||
|
||||
instr->op == nir_texop_txl) &&
|
||||
lod.file == BAD_FILE) {
|
||||
lod = brw_imm_ud(0u);
|
||||
}
|
||||
|
||||
if (instr->op == nir_texop_txf_ms ||
|
||||
instr->op == nir_texop_samples_identical) {
|
||||
assert(coord_type != NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue