v3d: Update prim_counts when prims generated query in flight without TF
In order to implement GL_PRIMITIVES_GENERATED, v3d allocates a small resource and adds a command to the job to store the prim counts to it. However it was only doing this when TF was enabled which meant that if the query was used with a geometry shader but no TF then the query would always be zero. This patch makes the driver keep track of how many PRIMITIVES_GENERATED queries are in flight and then enable writing the prim count if its more than zero. Fix dEQP-GLES31.functional.geometry_shading.query.primitives_generated_* v2: Update CI expectations and references to fixed tests in commit log. v3: - Add comment that GL_PRIMITIVES_GENERATED query is included because OES_geometry_shader, but it is not part of OpenGL ES 3.1. (Iago) - Update Fixes to commit introducing geometry shaders. (Iago) Fixes: a1b7c084 ("v3d: fix primitive queries for geometry shaders") Signed-off-by:Neil Roberts <nroberts@igalia.com> Signed-off-by:
Jose Maria Casanova Crespo <jmcasanova@igalia.com> Reviewed-by:
Iago Toral Quiroga <itoral@igalia.com> Part-of: <mesa/mesa!13712> (cherry picked from commit bdaf1858)
- .pick_status.json 1 addition, 1 deletion.pick_status.json
- src/broadcom/ci/v3d-rpi4-fails.txt 0 additions, 5 deletionssrc/broadcom/ci/v3d-rpi4-fails.txt
- src/gallium/drivers/v3d/v3d_context.c 14 additions, 0 deletionssrc/gallium/drivers/v3d/v3d_context.c
- src/gallium/drivers/v3d/v3d_context.h 6 additions, 0 deletionssrc/gallium/drivers/v3d/v3d_context.h
- src/gallium/drivers/v3d/v3d_job.c 18 additions, 4 deletionssrc/gallium/drivers/v3d/v3d_job.c
- src/gallium/drivers/v3d/v3d_query_pipe.c 2 additions, 0 deletionssrc/gallium/drivers/v3d/v3d_query_pipe.c
- src/gallium/drivers/v3d/v3dx_job.c 1 addition, 1 deletionsrc/gallium/drivers/v3d/v3dx_job.c
- src/gallium/drivers/v3d/v3dx_state.c 2 additions, 8 deletionssrc/gallium/drivers/v3d/v3dx_state.c