Commit 91e09399 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Enable fs/vs CSO unbinding

parent f1bcbe7b
......@@ -807,6 +807,7 @@ trans_emit_for_draw(struct panfrost_context *ctx)
}
if (ctx->dirty & PAN_DIRTY_VS) {
assert(ctx->vs);
ctx->payload_vertex._shader_upper = panfrost_upload(&ctx->cmdstream, &ctx->vs->tripipe, sizeof(struct mali_tripipe), true) >> 4;
panfrost_reserve(&ctx->cmdstream, sizeof(struct mali_fragment_core));
......@@ -818,6 +819,7 @@ trans_emit_for_draw(struct panfrost_context *ctx)
}
if (ctx->dirty & PAN_DIRTY_FS) {
assert(ctx->fs);
ctx->payload_tiler._shader_upper = panfrost_upload(&ctx->cmdstream, &ctx->fs->tripipe, sizeof(struct mali_tripipe), true) >> 4;
panfrost_upload_sequential(&ctx->cmdstream, &ctx->fragment_shader_core, sizeof(struct mali_fragment_core));
}
......@@ -1360,9 +1362,11 @@ panfrost_bind_fs_state(
ctx->fs = hwcso;
/* XXX TODO: Actual compilation pipeline */
if (!ctx->fs->compiled) {
panfrost_shader_compile(ctx, &ctx->fs->tripipe, NULL, JOB_TYPE_TILER);
ctx->fs->compiled = true;
if (hwcso) {
if (!ctx->fs->compiled) {
panfrost_shader_compile(ctx, &ctx->fs->tripipe, NULL, JOB_TYPE_TILER);
ctx->fs->compiled = true;
}
}
ctx->dirty |= PAN_DIRTY_FS;
......@@ -1377,10 +1381,12 @@ panfrost_bind_vs_state(
ctx->vs = hwcso;
if (!ctx->vs->compiled) {
panfrost_shader_compile(ctx, &ctx->vs->tripipe, NULL, JOB_TYPE_VERTEX);
ctx->vs->compiled = true;
}
if (hwcso) {
if (!ctx->vs->compiled) {
panfrost_shader_compile(ctx, &ctx->vs->tripipe, NULL, JOB_TYPE_VERTEX);
ctx->vs->compiled = true;
}
}
ctx->dirty |= PAN_DIRTY_VS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment