<div dir="ltr">On 23 August 2013 09:03, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 08/22/2013 04:07 PM, Matt Turner wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
.../built-in-functions/fs-<u></u>frexp.shader_test | 64 ++++++++++++++++++++++<br>
1 file changed, 64 insertions(+)<br>
create mode 100644 tests/spec/arb_gpu_shader5/<u></u>execution/built-in-functions/<u></u>fs-frexp.shader_test<br>
<br>
diff --git a/tests/spec/arb_gpu_shader5/<u></u>execution/built-in-functions/<u></u>fs-frexp.shader_test b/tests/spec/arb_gpu_shader5/<u></u>execution/built-in-functions/<u></u>fs-frexp.shader_test<br>
new file mode 100644<br>
index 0000000..2bef71d<br>
--- /dev/null<br>
+++ b/tests/spec/arb_gpu_shader5/<u></u>execution/built-in-functions/<u></u>fs-frexp.shader_test<br>
@@ -0,0 +1,64 @@<br>
+[require]<br>
+GLSL >= 1.50<br>
+GL_ARB_gpu_shader5<br>
+<br>
+[vertex shader]<br>
+in vec4 vertex;<br>
+<br>
+void main() {<br>
+ gl_Position = vertex;<br>
+}<br>
+<br>
+[fragment shader]<br>
+#extension GL_ARB_gpu_shader5 : enable<br>
+<br>
+out vec4 color;<br>
+<br>
+uniform vec4 given_float;<br>
+uniform vec4 expected_mantissa;<br>
+uniform ivec4 expected_exponent;<br>
+<br>
+void main()<br>
+{<br>
+ /* Green if both pass. */<br>
+ color = vec4(0.0, 1.0, 0.0, 1.0);<br>
+<br>
+ ivec4 exponent;<br>
+ vec4 mantissa;<br>
+<br>
+ mantissa = frexp(given_float, exponent);<br>
+<br>
+ if (mantissa != expected_mantissa) {<br>
+ color.r = 1.0;<br>
+ }<br>
+<br>
+ if (exponent != expected_exponent) {<br>
+ color.b = 1.0;<br>
+ }<br>
+}<br>
+<br>
+[vertex data]<br>
+vertex/float/2<br>
+-1.0 -1.0<br>
+ 1.0 -1.0<br>
+ 1.0 1.0<br>
+-1.0 1.0<br>
+<br>
+[test]<br>
+uniform vec4 given_float 0.0 -0.0 0.5 -0.5<br>
+uniform vec4 expected_mantissa 0.0 -0.0 0.5 -0.5<br>
+uniform ivec4 expected_exponent 0 0 0 0<br>
+draw arrays GL_TRIANGLE_FAN 0 4<br>
</blockquote>
<br></div></div>
draw rect -1 -1 2 2<br>
<br>
... in all the tests.</blockquote><div><br></div><div>I didn't think "draw rect" worked in a core context.<br><br></div><div>I have some ideas on how to modify piglit to make it work, but I've never found the time to do it.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im HOEnZb"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+probe all rgba 0.0 1.0 0.0 1.0<br>
+<br>
+uniform vec4 given_float 0.49 1.0 25.0 100<br>
+uniform vec4 expected_mantissa 0.98 0.5 0.78125 0.78125<br>
+uniform ivec4 expected_exponent -1 1 5 7<br>
+draw arrays GL_TRIANGLE_FAN 0 4<br>
+probe all rgba 0.0 1.0 0.0 1.0<br>
+<br>
+uniform vec4 given_float 1.1754944e-38 -1.1754944e-38 3.40282347e38 -3.40282347e38<br>
+uniform vec4 expected_mantissa 0.5 -0.5 0.999999940 -0.999999940<br>
+uniform ivec4 expected_exponent -125 -125 128 128<br>
+draw arrays GL_TRIANGLE_FAN 0 4<br>
+probe all rgba 0.0 1.0 0.0 1.0<br>
<br>
</blockquote>
<br></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org" target="_blank">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/piglit</a><br>
</div></div></blockquote></div><br></div></div>