asahi: avoid silly psiz writes even with gs

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
Alyssa Rosenzweig 2024-02-03 23:21:17 -04:00 committed by Marge Bot
parent 43dd8b87cb
commit 7ab1755b54
2 changed files with 9 additions and 1 deletions

View file

@ -2296,6 +2296,8 @@ agx_create_shader_state(struct pipe_context *pctx,
util_last_bit(nir->info.patch_outputs_written);
if (nir->info.stage == MESA_SHADER_TESS_CTRL)
so->tess.output_stride = agx_tcs_output_stride(nir);
} else if (nir->info.stage == MESA_SHADER_GEOMETRY) {
so->gs_mode = nir->info.gs.output_primitive;
}
agx_shader_initialize(dev, so, nir, ctx->support_lod_bias, ctx->robust);
@ -2550,6 +2552,9 @@ agx_update_gs(struct agx_context *ctx, const struct pipe_draw_info *info,
tgt->stride = gs->xfb_strides[i];
}
enum mesa_prim rasterized_prim =
rast_prim(gs->gs_mode, ctx->rast->base.fill_front);
struct asahi_gs_shader_key key = {
.mode = info->mode,
.flatshade_first =
@ -2559,7 +2564,8 @@ agx_update_gs(struct agx_context *ctx, const struct pipe_draw_info *info,
/* TODO: Deduplicate */
.clip_halfz = ctx->rast->base.clip_halfz,
.fixed_point_size = !ctx->rast->base.point_size_per_vertex,
.fixed_point_size = !ctx->rast->base.point_size_per_vertex &&
rasterized_prim == MESA_PRIM_POINTS,
.outputs_flat_shaded =
ctx->stage[PIPE_SHADER_FRAGMENT].shader->info.inputs_flat_shaded,
.outputs_linear_shaded =

View file

@ -241,6 +241,8 @@ struct agx_uncompiled_shader {
bool has_xfb_info;
bool is_xfb_passthrough;
enum mesa_prim gs_mode;
/* Whether the shader accesses indexed samplers via the bindless heap */
bool uses_bindless_samplers;