summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-11-11 11:01:59 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2015-11-23 11:04:49 -0800
commit6c8ba59cff14a1a86273f4008ff2a8e68335ab25 (patch)
tree76f5bde80b88f7243ec2a2a1809e9cf10f55ba73 /src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
parentd065a93a3f103a8e4fc9c56971c2a4ae195d611f (diff)
downloadexternal_mesa3d-6c8ba59cff14a1a86273f4008ff2a8e68335ab25.zip
external_mesa3d-6c8ba59cff14a1a86273f4008ff2a8e68335ab25.tar.gz
external_mesa3d-6c8ba59cff14a1a86273f4008ff2a8e68335ab25.tar.bz2
i965: Use nir_lower_tex for texture coordinate lowering
Previously, we had a rescale_texcoords helper in the FS backend for handling rescaling of texture coordinates. Now that we can do variants in NIR, we can use nir_lower_tex to do the rescaling for us. This allows us to delete the i965-specific code and gives us proper TEXTURE_RECTANGLE and GL_CLAMP handling in vertex and geometry shaders. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index 7174ee9..b13d36e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -618,6 +618,8 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data,
c.key = *key;
nir_shader *shader = nir_shader_clone(mem_ctx, src_shader);
+ shader = brw_nir_apply_sampler_key(shader, compiler->devinfo, &key->tex,
+ compiler->scalar_stage[MESA_SHADER_GEOMETRY]);
shader = brw_postprocess_nir(shader, compiler->devinfo,
compiler->scalar_stage[MESA_SHADER_GEOMETRY]);