mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
zink: move pending prim type to gfx pipeline struct
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
This commit is contained in:
parent
259e26e5e3
commit
da10f13de9
4 changed files with 5 additions and 5 deletions
|
|
@ -3543,7 +3543,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
|||
ctx->gfx_pipeline_state.dirty = true;
|
||||
ctx->compute_pipeline_state.dirty = true;
|
||||
ctx->fb_changed = ctx->rp_changed = true;
|
||||
ctx->gfx_prim_mode = PIPE_PRIM_MAX;
|
||||
ctx->gfx_pipeline_state.gfx_prim_mode = PIPE_PRIM_MAX;
|
||||
|
||||
zink_init_draw_functions(ctx, screen);
|
||||
zink_init_grid_functions(ctx);
|
||||
|
|
|
|||
|
|
@ -217,7 +217,6 @@ struct zink_context {
|
|||
bool shader_reads_drawid;
|
||||
bool shader_reads_basevertex;
|
||||
struct zink_gfx_pipeline_state gfx_pipeline_state;
|
||||
enum pipe_prim_type gfx_prim_mode;
|
||||
/* there are 5 gfx stages, but VS and FS are assumed to be always present,
|
||||
* thus only 3 stages need to be considered, giving 2^3 = 8 program caches.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
VkBuffer counter_buffers[PIPE_MAX_SO_OUTPUTS];
|
||||
VkDeviceSize counter_buffer_offsets[PIPE_MAX_SO_OUTPUTS];
|
||||
bool need_index_buffer_unref = false;
|
||||
bool mode_changed = ctx->gfx_prim_mode != dinfo->mode;
|
||||
bool mode_changed = ctx->gfx_pipeline_state.gfx_prim_mode != dinfo->mode;
|
||||
bool reads_drawid = ctx->shader_reads_drawid;
|
||||
bool reads_basevertex = ctx->shader_reads_basevertex;
|
||||
unsigned work_count = ctx->batch.work_count;
|
||||
|
|
@ -507,14 +507,14 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
if (mode == PIPE_PRIM_POINTS) {
|
||||
ctx->gfx_pipeline_state.has_points++;
|
||||
points_changed = true;
|
||||
} else if (ctx->gfx_prim_mode == PIPE_PRIM_POINTS) {
|
||||
} else if (ctx->gfx_pipeline_state.gfx_prim_mode == PIPE_PRIM_POINTS) {
|
||||
ctx->gfx_pipeline_state.has_points--;
|
||||
points_changed = true;
|
||||
}
|
||||
if (points_changed && ctx->rast_state->base.point_quad_rasterization)
|
||||
ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_FRAGMENT);
|
||||
}
|
||||
ctx->gfx_prim_mode = mode;
|
||||
ctx->gfx_pipeline_state.gfx_prim_mode = mode;
|
||||
|
||||
if (!HAS_DYNAMIC_STATE2) {
|
||||
if (ctx->gfx_pipeline_state.primitive_restart != dinfo->primitive_restart)
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ struct zink_gfx_pipeline_state {
|
|||
VkPipeline pipeline;
|
||||
uint8_t patch_vertices;
|
||||
unsigned idx : 8;
|
||||
enum pipe_prim_type gfx_prim_mode; //pending mode
|
||||
};
|
||||
|
||||
struct zink_compute_pipeline_state {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue