summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-01-16 19:09:52 -0800
committerKenneth Graunke <[email protected]>2013-01-18 11:31:26 -0800
commitaeff9a0d9889c4583e4f7fc89539380c1e6d043c (patch)
tree1042ae901775285f4978e42c7995c15e40ed97d0 /src/mesa
parent56ce55d198af65d4a9de7119eb9e2417296c54ea (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 594f927c3ab..313924571d8 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -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;