mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nvk: Set GEOMETRY_SHADER_SELECTS_LAYER properly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
2d108bb672
commit
91c1be22ed
1 changed files with 7 additions and 1 deletions
|
|
@ -247,6 +247,7 @@ nvk_graphics_pipeline_create(struct nvk_device *device,
|
|||
sizeof(pipeline->push_data));
|
||||
struct nouveau_ws_push *p = &pipeline->push;
|
||||
|
||||
struct nvk_shader *last_geom = NULL;
|
||||
for (gl_shader_stage stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) {
|
||||
struct nvk_shader *shader = &pipeline->base.shaders[stage];
|
||||
uint32_t idx = mesa_to_nv9097_shader_type[stage];
|
||||
|
|
@ -259,6 +260,9 @@ nvk_graphics_pipeline_create(struct nvk_device *device,
|
|||
if (shader->bo == NULL)
|
||||
continue;
|
||||
|
||||
if (stage != MESA_SHADER_FRAGMENT)
|
||||
last_geom = shader;
|
||||
|
||||
uint64_t addr = nvk_shader_address(shader);
|
||||
assert(device->ctx->eng3d.cls >= VOLTA_A);
|
||||
P_MTHD(p, NVC397, SET_PIPELINE_PROGRAM_ADDRESS_A(idx));
|
||||
|
|
@ -292,7 +296,9 @@ nvk_graphics_pipeline_create(struct nvk_device *device,
|
|||
/* TODO: prog_selects_layer */
|
||||
P_IMMD(p, NV9097, SET_RT_LAYER, {
|
||||
.v = 0,
|
||||
.control = CONTROL_V_SELECTS_LAYER,
|
||||
.control = (last_geom->hdr[13] & (1 << 9)) ?
|
||||
CONTROL_GEOMETRY_SHADER_SELECTS_LAYER :
|
||||
CONTROL_V_SELECTS_LAYER,
|
||||
});
|
||||
|
||||
struct vk_graphics_pipeline_all_state all;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue