mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 04:40:09 +01:00
panfrost: Use opaque pack for vertex shaders
Not much difference but eliminates a reference to shader_meta (and avoids a memcpy but who cares). Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
This commit is contained in:
parent
100b15cdc8
commit
c86b51a7fa
1 changed files with 11 additions and 8 deletions
|
|
@ -104,17 +104,20 @@ pan_upload_shader_descriptor(struct panfrost_context *ctx,
|
||||||
struct panfrost_shader_state *state)
|
struct panfrost_shader_state *state)
|
||||||
{
|
{
|
||||||
const struct panfrost_device *dev = pan_device(ctx->base.screen);
|
const struct panfrost_device *dev = pan_device(ctx->base.screen);
|
||||||
struct mali_shader_meta meta;
|
struct mali_state_packed *out;
|
||||||
|
|
||||||
memset(&meta, 0, sizeof(meta));
|
u_upload_alloc(ctx->state_uploader, 0, MALI_STATE_LENGTH, MALI_STATE_LENGTH,
|
||||||
memcpy(&meta.shader, &state->shader, sizeof(state->shader));
|
&state->upload.offset, &state->upload.rsrc, (void **) &out);
|
||||||
memcpy(&meta.midgard_props, &state->properties, sizeof(state->properties));
|
|
||||||
|
|
||||||
if (dev->quirks & IS_BIFROST)
|
pan_pack(out, STATE_OPAQUE, cfg) {
|
||||||
memcpy(&meta.bifrost_preload, &state->preload, sizeof(state->preload));
|
cfg.shader = state->shader;
|
||||||
|
memcpy(&cfg.properties, &state->properties, sizeof(state->properties));
|
||||||
|
|
||||||
u_upload_data(ctx->state_uploader, 0, sizeof(meta), sizeof(meta),
|
if (dev->quirks & IS_BIFROST)
|
||||||
&meta, &state->upload.offset, &state->upload.rsrc);
|
cfg.preload = state->preload;
|
||||||
|
}
|
||||||
|
|
||||||
|
u_upload_unmap(ctx->state_uploader);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue