iris: fix handling of GL_*_VERTEX_CONVENTION

By actually setting the state packets according to the program data.
Also ensure that we correctly flag that the program may be dirty when
the geometry shader state changes

Fixes piglit tests: `spec@!opengl 3.2@gl-3.2-adj-prims * pv-first`

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33658>
This commit is contained in:
Dylan Baker 2025-02-20 15:25:51 -08:00 committed by Marge Bot
parent 0477ee660f
commit c33ebf09f5
2 changed files with 20 additions and 7 deletions

View file

@ -5294,7 +5294,6 @@ iris_store_gs_state(const struct intel_device_info *devinfo,
#endif
gs.IncludePrimitiveID = gs_data->include_primitive_id;
gs.ControlDataFormat = gs_data->control_data_format;
gs.ReorderMode = TRAILING;
gs.ExpectedVertexCount = gs_data->vertices_in;
gs.MaximumNumberofThreads =
GFX_VER == 8 ? (devinfo->max_gs_threads / 2 - 1)
@ -7503,6 +7502,26 @@ iris_upload_dirty_render_state(struct iris_context *ice,
iris_emit_merge(batch, shader_te, te_state,
GENX(3DSTATE_TE_length));
#endif
} else if (stage == MESA_SHADER_GEOMETRY) {
const struct iris_rasterizer_state *cso_rast = ice->state.cso_rast;
uint32_t gs_state[GENX(3DSTATE_GS_length)] = { 0 };
iris_pack_command(GENX(3DSTATE_GS), gs_state, gs) {
gs.ReorderMode = cso_rast->flatshade_first ? LEADING : TRAILING;
if (scratch_addr)
#if GFX_VERx10 >= 125
gs.ScratchSpaceBuffer =
scratch_addr >> SCRATCH_SPACE_BUFFER_SHIFT;
#else
gs.ScratchSpaceBasePointer =
rw_bo(NULL, scratch_addr, IRIS_DOMAIN_NONE);
#endif
}
uint32_t *shader_gs = (uint32_t *) shader->derived_data;
iris_emit_merge(batch, shader_gs, gs_state,
GENX(3DSTATE_GS_length));
} else if (scratch_addr) {
uint32_t *pkt = (uint32_t *) shader->derived_data;
switch (stage) {

View file

@ -27,12 +27,6 @@ spec@!opengl 1.1@linestipple@Line strip,Fail
# Fail: nothing rendered.
spec@!opengl 2.0@vs-point_size-zero,Fail
spec@!opengl 3.2@gl-3.2-adj-prims cull-back pv-first,Fail
spec@!opengl 3.2@gl-3.2-adj-prims cull-front pv-first,Fail
spec@!opengl 3.2@gl-3.2-adj-prims line cull-back pv-first,Fail
spec@!opengl 3.2@gl-3.2-adj-prims line cull-front pv-first,Fail
spec@!opengl 3.2@gl-3.2-adj-prims pv-first,Fail
spec@arb_query_buffer_object@qbo,Fail
spec@arb_query_buffer_object@qbo@query-GL_TIMESTAMP-ASYNC_CPU_READ_AFTER-GL_INT,Fail
spec@arb_query_buffer_object@qbo@query-GL_TIMESTAMP-ASYNC_CPU_READ_AFTER-GL_UNSIGNED_INT,Fail