<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p>For series,</p>
<p><br>
</p>
<p>Reviewed-by: Neha Bhende<bhenden@vmware.com><br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="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="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Piglit <piglit-bounces@lists.freedesktop.org> on behalf of Brian Paul <brianp@vmware.com><br>
<b>Sent:</b> Friday, November 10, 2017 2:44:45 PM<br>
<b>To:</b> piglit@lists.freedesktop.org<br>
<b>Subject:</b> [Piglit] [PATCH 4/4] arb_sample_shading: don't use gl_FragColor/Data in fragment shaders</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText">NVIDIA's driver fails to compile the fragment shaders with "Failed to<br>
compile fragment shader: 0(4) : error C7533: global variable gl_FragData<br>
is deprecated after version 120".<br>
<br>
Use 'out fragdata' or 'out fragcolor' instead.<br>
<br>
Tested with Mesa too.<br>
---<br>
.../execution/ignore-centroid-qualifier.cpp | 9 ++++++---<br>
.../execution/interpolate-at-sample-position.cpp | 13 ++++++++-----<br>
2 files changed, 14 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp b/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp<br>
index c286c5c..105f837 100644<br>
--- a/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp<br>
+++ b/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp<br>
@@ -147,8 +147,9 @@ piglit_init(int argc, char**argv)<br>
"#version 130\n"<br>
"#extension GL_ARB_sample_shading: require\n"<br>
"centroid in vec2 test;\n"<br>
+ "out vec4 fragcolor;\n"<br>
"void main() {\n"<br>
- " gl_FragColor = vec4(abs(test), 0, 1);\n"<br>
+ " fragcolor = vec4(abs(test), 0, 1);\n"<br>
"}\n");<br>
<br>
draw_prog_right = piglit_build_simple_program(<br>
@@ -169,8 +170,9 @@ piglit_init(int argc, char**argv)<br>
<br>
"#version 130\n"<br>
"in vec2 ref;\n"<br>
+ "out vec4 fragcolor;\n"<br>
"void main() {\n"<br>
- " gl_FragColor = vec4(abs(ref), 0, 1);\n"<br>
+ " fragcolor = vec4(abs(ref), 0, 1);\n"<br>
"}\n");<br>
sample_pos_loc = glGetUniformLocation(draw_prog_right, "sample_pos");<br>
<br>
@@ -185,8 +187,9 @@ piglit_init(int argc, char**argv)<br>
"#extension GL_ARB_texture_multisample: require\n"<br>
"uniform int sample_id;\n"<br>
"uniform sampler2DMS tex;\n"<br>
+ "out vec4 fragcolor;\n"<br>
"void main() {\n"<br>
- " gl_FragColor = texelFetch(tex, ivec2(gl_FragCoord.xy),\n"<br>
+ " fragcolor = texelFetch(tex, ivec2(gl_FragCoord.xy),\n"<br>
" sample_id);\n"<br>
"}\n");<br>
<br>
diff --git a/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp b/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp<br>
index 6d0123b..36ede0d 100644<br>
--- a/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp<br>
+++ b/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp<br>
@@ -162,9 +162,10 @@ piglit_init(int argc, char**argv)<br>
"#extension GL_ARB_sample_shading: require\n"<br>
"in vec2 test_center;\n"<br>
"centroid in vec2 test_centroid;\n"<br>
+ "out vec4 fragdata[2];\n"<br>
"void main() {\n"<br>
- " gl_FragData[0] = vec4(abs(test_center), 0, 1);\n"<br>
- " gl_FragData[1] = vec4(abs(test_centroid), 0, 1);\n"<br>
+ " fragdata[0] = vec4(abs(test_center), 0, 1);\n"<br>
+ " fragdata[1] = vec4(abs(test_centroid), 0, 1);\n"<br>
"}\n");<br>
<br>
draw_prog_right = piglit_build_simple_program(<br>
@@ -185,9 +186,10 @@ piglit_init(int argc, char**argv)<br>
<br>
"#version 130\n"<br>
"in vec2 ref;\n"<br>
+ "out vec4 fragdata[2];\n"<br>
"void main() {\n"<br>
- " gl_FragData[0] = vec4(abs(ref), 0, 1);\n"<br>
- " gl_FragData[1] = vec4(abs(ref), 0, 1);\n"<br>
+ " fragdata[0] = vec4(abs(ref), 0, 1);\n"<br>
+ " fragdata[1] = vec4(abs(ref), 0, 1);\n"<br>
"}\n");<br>
sample_pos_loc = glGetUniformLocation(draw_prog_right, "sample_pos");<br>
<br>
@@ -203,9 +205,10 @@ piglit_init(int argc, char**argv)<br>
"uniform int sample_id;\n"<br>
"uniform sampler2DMS tex_center;\n"<br>
"uniform sampler2DMS tex_centroid;\n"<br>
+ "out vec4 fragcolor;\n"<br>
"void main() {\n"<br>
" ivec2 coord = ivec2(gl_FragCoord.xy);\n"<br>
- " gl_FragColor = coord.y < 128 ? \n"<br>
+ " fragcolor = coord.y < 128 ? \n"<br>
" texelFetch(tex_center, coord, sample_id) :\n"<br>
" texelFetch(tex_centroid, coord - ivec2(0, 128), sample_id);\n"<br>
"}\n");<br>
-- <br>
1.9.1<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
Piglit@lists.freedesktop.org<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_piglit&d=DwIGaQ&c=uilaK90D4TOVoH58JNXRgQ&r=U9C05uEFArICiTQ6FqFIgVCB-YGE5G2JTThVEccv_Ec&m=0p14veV0v53IcqR1i9LxGRcQgKTIa1wNr7XUCr9NVgY&s=GsSINHpOd7mNdnpu_ubOZ4lEHfCDx-cOWnpozp0D9qk&e=" id="LPlnk106941" previewremoved="true">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_piglit&d=DwIGaQ&c=uilaK90D4TOVoH58JNXRgQ&r=U9C05uEFArICiTQ6FqFIgVCB-YGE5G2JTThVEccv_Ec&m=0p14veV0v53IcqR1i9LxGRcQgKTIa1wNr7XUCr9NVgY&s=GsSINHpOd7mNdnpu_ubOZ4lEHfCDx-cOWnpozp0D9qk&e=</a><br>
</div>
</span></font></div>
</div>
</body>
</html>