summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorNeha Bhende <bhenden@vmware.com>2018-08-30 14:46:56 -0700
committerBrian Paul <brianp@vmware.com>2018-09-20 13:20:10 -0600
commitede805dd190fd3cd8e326e9b3191d2ed8ac14826 (patch)
tree756717576ed499305eb3c69918c16fba9834abea /src/gallium/drivers/svga
parent1dcf377a76cc4fa3e1c5312b0e10c4754532b512 (diff)
svga: Apply texcoord scale factors only if there is sampler view
We need to convert unnormalized texcoords to normalized texcoords when we are sampling from texture. We don't need this conversion if there is no sampler view. Tested with piglit, glretrace Fixes vmware bug 2101970 Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_vgpu10.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
index b9aaeba0bb9..a5bbb4d0f2a 100644
--- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
+++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
@@ -4967,7 +4967,7 @@ setup_texcoord(struct svga_shader_emitter_v10 *emit,
unsigned unit,
const struct tgsi_full_src_register *coord)
{
- if (emit->key.tex[unit].unnormalized) {
+ if (emit->sampler_view[unit] && emit->key.tex[unit].unnormalized) {
unsigned scale_index = emit->texcoord_scale_index[unit];
unsigned tmp = get_temp_index(emit);
struct tgsi_full_src_register tmp_src = make_src_temp_reg(tmp);