zink: zink: add parent
to zink_shader::non_fs
For a generated gs this field will store a pointer to the shader that "owns" it. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>
This commit is contained in:
@@ -2330,6 +2330,7 @@ zink_set_primitive_emulation_keys(struct zink_context *ctx)
|
||||
shader->needs_inlining = true;
|
||||
ctx->gfx_stages[prev_vertex_stage]->non_fs.generated_gs[ctx->gfx_pipeline_state.gfx_prim_mode][zink_prim_type] = shader;
|
||||
shader->non_fs.is_generated = true;
|
||||
shader->non_fs.parent = ctx->gfx_stages[prev_vertex_stage];
|
||||
shader->can_inline = true;
|
||||
shader->sinfo.so_info = ctx->gfx_stages[prev_vertex_stage]->sinfo.so_info;
|
||||
}
|
||||
|
@@ -768,6 +768,8 @@ struct zink_shader {
|
||||
struct {
|
||||
struct zink_shader *generated_tcs; // a generated shader that this shader "owns"; only valid in the tes stage
|
||||
struct zink_shader *generated_gs[PIPE_PRIM_MAX][ZINK_PRIM_MAX]; // generated shaders that this shader "owns"
|
||||
struct zink_shader *parent; // for a generated gs this points to the shader that "owns" it
|
||||
|
||||
bool is_generated; // if this is a driver-created shader (e.g., tcs)
|
||||
} non_fs;
|
||||
|
||||
|
Reference in New Issue
Block a user