crocus: Clamp VS point sizes to the HW limits as required.
authorEmma Anholt <emma@anholt.net>
Thu, 16 Dec 2021 20:26:53 +0000 (12:26 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 17 Dec 2021 19:41:54 +0000 (19:41 +0000)
Fixes piglit vs-point-size-zero.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14238>

src/gallium/drivers/crocus/ci/crocus-g41-fails.txt
src/gallium/drivers/crocus/crocus_program.c

index 5f6961f..feccae2 100644 (file)
@@ -113,9 +113,6 @@ spec@!opengl 1.4@gl-1.4-polygon-offset,Fail
 spec@!opengl 2.0@max-samplers,Fail
 spec@!opengl 2.0@max-samplers border,Fail
 
-# "Fail: nothing rendered."
-spec@!opengl 2.0@vs-point_size-zero,Fail
-
 # Regression from i965
 # "data not copied"
 spec@arb_copy_buffer@targets,Fail
index 9195829..24fcaf1 100644 (file)
@@ -2701,6 +2701,9 @@ crocus_create_uncompiled_shader(struct pipe_context *ctx,
    NIR_PASS_V(nir, brw_nir_lower_storage_image, devinfo);
    NIR_PASS_V(nir, crocus_lower_storage_image_derefs);
 
+   if (nir->info.stage != MESA_SHADER_FRAGMENT && nir->info.stage != MESA_SHADER_COMPUTE)
+      NIR_PASS_V(nir, nir_lower_point_size, 1.0, 255.0);
+
    nir_sweep(nir);
 
    ish->program_id = get_new_program_id(screen);