mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
i965/vs: Set LOD to 0 for ordinary texture() calls.
Previously it was left undefined, causing us to select a random LOD. NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <idr@freedesktop.org>
This commit is contained in:
parent
56ce55d198
commit
aeff9a0d98
1 changed files with 5 additions and 2 deletions
|
|
@ -1956,6 +1956,10 @@ vec4_visitor::visit(ir_texture *ir)
|
|||
const glsl_type *lod_type;
|
||||
src_reg lod, dPdx, dPdy;
|
||||
switch (ir->op) {
|
||||
case ir_tex:
|
||||
lod = src_reg(0.0f);
|
||||
lod_type = glsl_type::float_type;
|
||||
break;
|
||||
case ir_txf:
|
||||
case ir_txl:
|
||||
case ir_txs:
|
||||
|
|
@ -1972,7 +1976,6 @@ vec4_visitor::visit(ir_texture *ir)
|
|||
|
||||
lod_type = ir->lod_info.grad.dPdx->type;
|
||||
break;
|
||||
case ir_tex:
|
||||
case ir_txb:
|
||||
break;
|
||||
}
|
||||
|
|
@ -2055,7 +2058,7 @@ vec4_visitor::visit(ir_texture *ir)
|
|||
}
|
||||
|
||||
/* Load the LOD info */
|
||||
if (ir->op == ir_txl) {
|
||||
if (ir->op == ir_tex || ir->op == ir_txl) {
|
||||
int mrf, writemask;
|
||||
if (intel->gen >= 5) {
|
||||
mrf = param_base + 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue