<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Looks good to me.</p>
<p><br>
</p>
<p>Reviewed-by: Neha Bhende<bhenden@vmware.com><br>
</p>
<p><br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p>Regards,</p>
<p>Neha<br>
</p>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Brian Paul <brianp@vmware.com><br>
<b>Sent:</b> Tuesday, July 11, 2017 1:09:29 PM<br>
<b>To:</b> piglit@lists.freedesktop.org<br>
<b>Cc:</b> Charmaine Lee; Neha Bhende; Brian Paul<br>
<b>Subject:</b> [PATCH] blit-scaled-linear: minor shader code improvements</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Use vector operations instead of scalar.<br>
Simplify vec2 constructor usage.<br>
---<br>
 tests/spec/arb_framebuffer_object/blit-scaled-linear.cpp | 12 +++++-------<br>
 1 file changed, 5 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/tests/spec/arb_framebuffer_object/blit-scaled-linear.cpp b/tests/spec/arb_framebuffer_object/blit-scaled-linear.cpp<br>
index bdc6cd8..37ed7c4 100644<br>
--- a/tests/spec/arb_framebuffer_object/blit-scaled-linear.cpp<br>
+++ b/tests/spec/arb_framebuffer_object/blit-scaled-linear.cpp<br>
@@ -80,17 +80,15 @@ compile_shader(void)<br>
                 "{\n"<br>
                 "  vec2 f;\n"<br>
                 "  vec4 c0, c1, c2, c3;\n"<br>
-               "  vec2 tex_coord = textureCoord - vec2(0.5, 0.5);\n"<br>
+               "  vec2 tex_coord = textureCoord - vec2(0.5);\n"<br>
                 "\n"<br>
                 "  tex_coord.xy = clamp(tex_coord.xy,\n"<br>
-               "                      vec2(0.0, 0.0),\n"<br>
-               "                      vec2 (xmax - 1.0, ymax - 1.0));\n"<br>
+               "                       vec2(0.0),\n"<br>
+               "                       vec2(xmax, ymax) - vec2(1.0));\n"<br>
                 "\n"<br>
-               "  f.x = fract(tex_coord.x);\n"<br>
-               "  f.y = fract(tex_coord.y);\n"<br>
+               "  f = fract(tex_coord);\n"<br>
                 "\n"<br>
-               "  tex_coord.x = tex_coord.x - f.x;\n"<br>
-               "  tex_coord.y = tex_coord.y - f.y;\n"<br>
+               "  tex_coord = tex_coord - f;\n"<br>
                 "\n"<br>
                 "    c0 = texture2DRect(tex2d, tex_coord.xy + vec2(0, 0));\n"<br>
                 "    c1 = texture2DRect(tex2d, tex_coord.xy + vec2(1, 0));\n"<br>
-- <br>
1.9.1<br>
<br>
</div>
</span></font>
</body>
</html>