v3d: Enable NaN propagation in the VS and CS as well.
authorEric Anholt <eric@anholt.net>
Tue, 8 May 2018 20:22:57 +0000 (13:22 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 17 May 2018 14:09:12 +0000 (15:09 +0100)
Fixes piglit vs-isnan-*.shader_test at the expense of gl-1.0-spot-light.

src/broadcom/cle/v3d_packet_v33.xml
src/broadcom/cle/v3d_packet_v41.xml
src/broadcom/cle/v3d_packet_v42.xml
src/gallium/drivers/v3d/v3dx_draw.c

index aac9fbfd28fa4e7d0c97bafabb98288261966de9..22d43cc8025cce45bb87a4a21d416299c6f2f3c8 100644 (file)
     <field name="Fragment Shader Code Address" size="29" start="99" type="address"/>
     <field name="Fragment Shader 2-way threadable" size="1" start="96" type="bool"/>
     <field name="Fragment Shader 4-way threadable" size="1" start="97" type="bool"/>
-    <field name="Propagate NaNs" size="1" start="98" type="bool"/>
+    <field name="Fragment Shader Propagate NaNs" size="1" start="98" type="bool"/>
     <field name="Fragment Shader Uniforms Address" size="32" start="16b" type="address"/>
     <field name="Vertex Shader Code Address" size="32" start="20b" type="address"/>
     <field name="Vertex Shader 2-way threadable" size="1" start="160" type="bool"/>
     <field name="Vertex Shader 4-way threadable" size="1" start="161" type="bool"/>
+    <field name="Vertex Shader Propagate NaNs" size="1" start="162" type="bool"/>
     <field name="Vertex Shader Uniforms Address" size="32" start="24b" type="address"/>
     <field name="Coordinate Shader Code Address" size="32" start="28b" type="address"/>
     <field name="Coordinate Shader 2-way threadable" size="1" start="224" type="bool"/>
     <field name="Coordinate Shader 4-way threadable" size="1" start="225" type="bool"/>
+    <field name="Coordinate Shader Propagate NaNs" size="1" start="226" type="bool"/>
     <field name="Coordinate Shader Uniforms Address" size="32" start="32b" type="address"/>
   </struct>
 
index 5f6d643195a16c546efdf0c55a80ece02689b6ed..1fb5d5d2843071de1ee21055243b949866e749e9 100644 (file)
     <field name="Fragment Shader Code Address" size="32" start="12b" type="address"/>
     <field name="Fragment Shader 4-way threadable" size="1" start="96" type="bool"/>
     <field name="Fragment Shader start in final thread section" size="1" start="97" type="bool"/>
-    <field name="Propagate NaNs" size="1" start="98" type="bool"/>
+    <field name="Fragment Shader Propagate NaNs" size="1" start="98" type="bool"/>
     <field name="Fragment Shader Uniforms Address" size="32" start="16b" type="address"/>
 
     <field name="Vertex Shader Code Address" size="32" start="20b" type="address"/>
     <field name="Vertex Shader 4-way threadable" size="1" start="160" type="bool"/>
     <field name="Vertex Shader start in final thread section" size="1" start="161" type="bool"/>
+    <field name="Vertex Shader Propagate NaNs" size="1" start="162" type="bool"/>
     <field name="Vertex Shader Uniforms Address" size="32" start="24b" type="address"/>
 
     <field name="Coordinate Shader Code Address" size="32" start="28b" type="address"/>
     <field name="Coordinate Shader 4-way threadable" size="1" start="224" type="bool"/>
     <field name="Coordinate Shader start in final thread section" size="1" start="225" type="bool"/>
+    <field name="Coordinate Shader Propagate NaNs" size="1" start="226" type="bool"/>
     <field name="Coordinate Shader Uniforms Address" size="32" start="32b" type="address"/>
   </struct>
 
index f180e5eec5e81e9fa7987bba2d89175a77ccaa66..a562d662ff3624b11a05051fdacbec67db00dc18 100644 (file)
     <field name="Fragment Shader Code Address" size="32" start="12b" type="address"/>
     <field name="Fragment Shader 4-way threadable" size="1" start="96" type="bool"/>
     <field name="Fragment Shader start in final thread section" size="1" start="97" type="bool"/>
-    <field name="Propagate NaNs" size="1" start="98" type="bool"/>
+    <field name="Fragment Shader Propagate NaNs" size="1" start="98" type="bool"/>
     <field name="Fragment Shader Uniforms Address" size="32" start="16b" type="address"/>
 
     <field name="Vertex Shader Code Address" size="32" start="20b" type="address"/>
     <field name="Vertex Shader 4-way threadable" size="1" start="160" type="bool"/>
     <field name="Vertex Shader start in final thread section" size="1" start="161" type="bool"/>
+    <field name="Vertex Shader Propagate NaNs" size="1" start="162" type="bool"/>
     <field name="Vertex Shader Uniforms Address" size="32" start="24b" type="address"/>
 
     <field name="Coordinate Shader Code Address" size="32" start="28b" type="address"/>
     <field name="Coordinate Shader 4-way threadable" size="1" start="224" type="bool"/>
     <field name="Coordinate Shader start in final thread section" size="1" start="225" type="bool"/>
+    <field name="Coordinate Shader Propagate NaNs" size="1" start="226" type="bool"/>
     <field name="Coordinate Shader Uniforms Address" size="32" start="32b" type="address"/>
   </struct>
 
index 28b35165c77c2ca37c8a30d0aff79fc010f3b8fe..4d872b30ec3a4dc7eaaf705789c96ac16e8ab6d3 100644 (file)
@@ -183,7 +183,9 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
                 shader.number_of_varyings_in_fragment_shader =
                         v3d->prog.fs->prog_data.base->num_inputs;
 
-                shader.propagate_nans = true;
+                shader.coordinate_shader_propagate_nans = true;
+                shader.vertex_shader_propagate_nans = true;
+                shader.fragment_shader_propagate_nans = true;
 
                 shader.coordinate_shader_code_address =
                         cl_address(v3d->prog.cs->bo, 0);