<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 14, 2016, at 7:03 PM, 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="">Fixes glsl-arb-fragment-coord-conventions.<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 | 10 ++++++++--<br class="">
1 file changed, 8 insertions(+), 2 deletions(-)<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 f639df3..e4f9796 100644<br class="">
--- a/src/gallium/drivers/swr/swr_shader.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_shader.cpp<br class="">
@@ -500,8 +500,14 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)<br class="">
inputs[attrib][3] = wrap(VIMMED1(1.0f));<br class="">
continue;<br class="">
} else if (semantic_name == TGSI_SEMANTIC_POSITION) { // gl_FragCoord<br class="">
- inputs[attrib][0] = wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vX, PixelPositions_center}, "vX"));<br class="">
- inputs[attrib][1] = wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vY, PixelPositions_center}, "vY"));<br class="">
+ if (swr_fs->info.base.properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER] ==<br class="">
+ TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER) {<br class="">
+ inputs[attrib][0] = wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vX, PixelPositions_center}, "vX"));<br class="">
+ inputs[attrib][1] = wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vY, PixelPositions_center}, "vY"));<br class="">
+ } else {<br class="">
+ inputs[attrib][0] = wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vX, PixelPositions_UL}, "vX"));<br class="">
+ inputs[attrib][1] = wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vY, PixelPositions_UL}, "vY"));<br class="">
+ }<br class="">
inputs[attrib][2] = wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vZ}, "vZ"));<br class="">
inputs[attrib][3] =<br class="">
wrap(LOAD(pPS, {0, SWR_PS_CONTEXT_vOneOverW, PixelPositions_center}, "vOneOverW"));<br class="">
-- <br class="">
2.7.3<br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>