crocus/gen8: add VF topology support
this is a new command on gen8 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
This commit is contained in:
parent
961ee7e72b
commit
786cf437db
|
@ -112,6 +112,7 @@ enum {
|
|||
#define CROCUS_DIRTY_GEN4_FF_GS_PROG (1ull << 34)
|
||||
#define CROCUS_DIRTY_GEN6_SAMPLER_STATE_POINTERS (1ull << 35)
|
||||
#define CROCUS_DIRTY_GEN6_SVBI (1ull << 36)
|
||||
#define CROCUS_DIRTY_GEN8_VF_TOPOLOGY (1ull << 37)
|
||||
|
||||
#define CROCUS_ALL_DIRTY_FOR_COMPUTE (CROCUS_DIRTY_COMPUTE_RESOLVES_AND_FLUSHES)
|
||||
|
||||
|
|
|
@ -139,6 +139,9 @@ crocus_update_draw_info(struct crocus_context *ice,
|
|||
if (ice->state.prim_mode != mode) {
|
||||
ice->state.prim_mode = mode;
|
||||
|
||||
if (screen->devinfo.ver == 8)
|
||||
ice->state.dirty |= CROCUS_DIRTY_GEN8_VF_TOPOLOGY;
|
||||
|
||||
if (screen->devinfo.ver < 6)
|
||||
ice->state.dirty |= CROCUS_DIRTY_GEN4_CLIP_PROG | CROCUS_DIRTY_GEN4_SF_PROG;
|
||||
if (screen->devinfo.ver <= 6)
|
||||
|
@ -159,6 +162,8 @@ crocus_update_draw_info(struct crocus_context *ice,
|
|||
ice->state.vertices_per_patch != info->vertices_per_patch) {
|
||||
ice->state.vertices_per_patch = info->vertices_per_patch;
|
||||
|
||||
if (screen->devinfo.ver == 8)
|
||||
ice->state.dirty |= CROCUS_DIRTY_GEN8_VF_TOPOLOGY;
|
||||
/* This is needed for key->input_vertices */
|
||||
ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_UNCOMPILED_TCS;
|
||||
|
||||
|
|
|
@ -6961,6 +6961,15 @@ crocus_upload_dirty_render_state(struct crocus_context *ice,
|
|||
crocus_batch_emit(batch, cso->line_stipple, sizeof(cso->line_stipple));
|
||||
}
|
||||
|
||||
#if GFX_VER >= 8
|
||||
if (dirty & CROCUS_DIRTY_GEN8_VF_TOPOLOGY) {
|
||||
crocus_emit_cmd(batch, GENX(3DSTATE_VF_TOPOLOGY), topo) {
|
||||
topo.PrimitiveTopologyType =
|
||||
translate_prim_type(draw->mode, draw->vertices_per_patch);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GFX_VER <= 5
|
||||
if (dirty & CROCUS_DIRTY_GEN5_PIPELINED_POINTERS) {
|
||||
upload_pipelined_state_pointers(batch, ice->shaders.ff_gs_prog ? true : false, ice->shaders.gs_offset,
|
||||
|
|
Loading…
Reference in New Issue