<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Reviewed-by: Tim Rowley <<a href="mailto:timothy.o.rowley@intel.com" class="">timothy.o.rowley@intel.com</a>>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Nov 21, 2016, at 11:52 AM, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">This fixes gl-coord-replace-doesnt-eliminate-frag-tex-coords<br class="">
<br class="">
Signed-off-by: Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>><br class="">
---<br class="">
src/gallium/drivers/swr/swr_shader.cpp | 3 ++-<br class="">
src/gallium/drivers/swr/swr_shader.h   | 1 +<br class="">
2 files changed, 3 insertions(+), 1 deletion(-)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp<br class="">
index d29f635..428c9b3 100644<br class="">
--- a/src/gallium/drivers/swr/swr_shader.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_shader.cpp<br class="">
@@ -131,6 +131,7 @@ swr_generate_fs_key(struct swr_jit_fs_key &key,<br class="">
<br class="">
   key.nr_cbufs = ctx->framebuffer.nr_cbufs;<br class="">
   key.light_twoside = ctx->rasterizer->light_twoside;<br class="">
+   key.sprite_coord_enable = ctx->rasterizer->sprite_coord_enable;<br class="">
   memcpy(&key.vs_output_semantic_name,<br class="">
          &ctx->vs->info.base.output_semantic_name,<br class="">
          sizeof(key.vs_output_semantic_name));<br class="">
@@ -515,7 +516,7 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)<br class="">
      unsigned linkedAttrib =<br class="">
         locate_linkage(semantic_name, semantic_idx, &ctx->vs->info.base);<br class="">
      if (semantic_name == TGSI_SEMANTIC_GENERIC &&<br class="">
-          ctx->rasterizer->sprite_coord_enable & (1 << semantic_idx)) {<br class="">
+          key.sprite_coord_enable & (1 << semantic_idx)) {<br class="">
         /* we add an extra attrib to the backendState in swr_update_derived. */<br class="">
         linkedAttrib = ctx->vs->info.base.num_outputs - 1;<br class="">
         swr_fs->pointSpriteMask |= (1 << linkedAttrib);<br class="">
diff --git a/src/gallium/drivers/swr/swr_shader.h b/src/gallium/drivers/swr/swr_shader.h<br class="">
index ccdda44..7e3399c 100644<br class="">
--- a/src/gallium/drivers/swr/swr_shader.h<br class="">
+++ b/src/gallium/drivers/swr/swr_shader.h<br class="">
@@ -51,6 +51,7 @@ struct swr_jit_sampler_key {<br class="">
struct swr_jit_fs_key : swr_jit_sampler_key {<br class="">
   unsigned nr_cbufs;<br class="">
   unsigned light_twoside;<br class="">
+   unsigned sprite_coord_enable;<br class="">
   ubyte vs_output_semantic_name[PIPE_MAX_SHADER_OUTPUTS];<br class="">
   ubyte vs_output_semantic_idx[PIPE_MAX_SHADER_OUTPUTS];<br class="">
};<br class="">
-- <br class="">
2.7.3<br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>