panfrost: invert and rename no_ubo_to_push flag

only the GL driver actually wants this, neither panvk nor internal shaders do.

Cc'd as a prereq to the next patch

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
(cherry picked from commit f179f6952f)
This commit is contained in:
Alyssa Rosenzweig 2024-03-21 16:27:45 -04:00 committed by Eric Engestrom
parent 4fde719367
commit 5ad25a98ef
10 changed files with 7 additions and 11 deletions

View file

@ -2424,7 +2424,7 @@
"description": "panfrost: invert and rename no_ubo_to_push flag",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -130,6 +130,7 @@ panfrost_shader_compile(struct panfrost_screen *screen, const nir_shader *ir,
struct panfrost_compile_inputs inputs = {
.debug = dbg,
.gpu_id = panfrost_device_gpu_id(dev),
.push_uniforms = true,
};
if (dev->arch >= 9)

View file

@ -1229,7 +1229,7 @@ bi_emit_load_ubo(bi_builder *b, nir_intrinsic_instr *instr)
static void
bi_emit_load_push_constant(bi_builder *b, nir_intrinsic_instr *instr)
{
assert(b->shader->inputs->no_ubo_to_push && "can't mix push constant forms");
assert(!b->shader->inputs->push_uniforms && "can't mix push constant forms");
nir_src *offset = &instr->src[0];
assert(!nir_intrinsic_base(instr) && "base must be zero");
@ -5571,7 +5571,7 @@ bi_compile_variant_nir(nir_shader *nir,
bi_validate(ctx, "Early lowering");
/* Runs before copy prop */
if (optimize && !ctx->inputs->no_ubo_to_push) {
if (optimize && ctx->inputs->push_uniforms) {
bi_opt_push_ubo(ctx);
}
@ -5596,7 +5596,7 @@ bi_compile_variant_nir(nir_shader *nir,
bi_opt_dce(ctx, false);
bi_opt_cse(ctx);
bi_opt_dce(ctx, false);
if (!ctx->inputs->no_ubo_to_push)
if (ctx->inputs->push_uniforms)
bi_opt_reorder_push(ctx);
bi_validate(ctx, "Optimization passes");
}

View file

@ -108,7 +108,6 @@ pan_indirect_dispatch_init(struct pan_indirect_dispatch_meta *meta)
struct panfrost_compile_inputs inputs = {
.gpu_id = meta->gpu_id,
.no_ubo_to_push = true,
};
struct pan_shader_info shader_info;
struct util_dynarray binary;

View file

@ -265,7 +265,7 @@ mir_special_indices(compiler_context *ctx)
void
midgard_promote_uniforms(compiler_context *ctx)
{
if (ctx->inputs->no_ubo_to_push) {
if (!ctx->inputs->push_uniforms) {
/* If nothing is pushed, all UBOs need to be uploaded
* conventionally */
ctx->ubo_mask = ~0;

View file

@ -104,7 +104,7 @@ struct panfrost_compile_inputs {
uint64_t bifrost_blend_desc;
} blend;
bool no_idvs;
bool no_ubo_to_push;
bool push_uniforms;
uint32_t view_mask;
/* Used on Valhall.

View file

@ -294,7 +294,6 @@ panvk_meta_desc_copy_rsd(struct panvk_device *dev)
struct panfrost_compile_inputs inputs = {
.gpu_id = phys_dev->kmod.props.gpu_prod_id,
.no_ubo_to_push = true,
};
pan_shader_preprocess(b.shader, inputs.gpu_id);

View file

@ -89,7 +89,6 @@ get_blend_shader(struct panvk_device *dev,
/* Compile the NIR shader */
struct panfrost_compile_inputs inputs = {
.gpu_id = pdev->kmod.props.gpu_prod_id,
.no_ubo_to_push = true,
.is_blend = true,
.blend = {
.nr_samples = key.info.nr_samples,

View file

@ -171,7 +171,6 @@ get_preload_shader(struct panvk_device *dev,
struct panfrost_compile_inputs inputs = {
.gpu_id = phys_dev->kmod.props.gpu_prod_id,
.no_ubo_to_push = true,
.is_blit = true,
};

View file

@ -1050,7 +1050,6 @@ panvk_compile_shader(struct panvk_device *dev,
struct panfrost_compile_inputs inputs = {
.gpu_id = phys_dev->kmod.props.gpu_prod_id,
.no_ubo_to_push = true,
.view_mask = (state && state->rp) ? state->rp->view_mask : 0,
};