render->stencil_att.iview == NULL)
render->color_att_count = 1;
- struct nv_push *p = nvk_cmd_buffer_push(cmd, render->color_att_count * 10 + 23);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, render->color_att_count * 10 + 25);
+
+ P_IMMD(p, NV9097, SET_MME_SHADOW_SCRATCH(NVK_MME_SCRATCH_VIEW_MASK),
+ render->view_mask);
P_MTHD(p, NV9097, SET_SURFACE_CLIP_HORIZONTAL);
P_NV9097_SET_SURFACE_CLIP_HORIZONTAL(p, {
nvk_mme_draw(struct mme_builder *b)
{
nvk_mme_load_to_scratch(b, DRAW_BEGIN);
- nvk_mme_load_to_scratch(b, VIEW_MASK);
nvk_mme_build_draw(b, mme_zero());
}
.split_mode = SPLIT_MODE_NORMAL_BEGIN_NORMAL_END,
});
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 7);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 6);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
P_INLINE_DATA(p, vertexCount);
P_INLINE_DATA(p, instanceCount);
P_INLINE_DATA(p, firstVertex);
nvk_mme_draw_indexed(struct mme_builder *b)
{
nvk_mme_load_to_scratch(b, DRAW_BEGIN);
- nvk_mme_load_to_scratch(b, VIEW_MASK);
nvk_mme_build_draw_indexed(b, mme_zero());
}
.split_mode = SPLIT_MODE_NORMAL_BEGIN_NORMAL_END,
});
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 8);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 7);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW_INDEXED));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
P_INLINE_DATA(p, indexCount);
P_INLINE_DATA(p, instanceCount);
P_INLINE_DATA(p, firstIndex);
nvk_mme_draw_indirect(struct mme_builder *b)
{
nvk_mme_load_to_scratch(b, DRAW_BEGIN);
- nvk_mme_load_to_scratch(b, VIEW_MASK);
if (b->devinfo->cls_eng3d >= TURING_A) {
struct mme_value64 draw_addr = mme_load_addr64(b);
});
if (nvk_cmd_buffer_3d_cls(cmd) >= TURING_A) {
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 9);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 8);
P_IMMD(p, NVC597, SET_MME_DATA_FIFO_CONFIG, FIFO_SIZE_SIZE_4KB);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW_INDIRECT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
uint64_t draw_addr = nvk_buffer_address(buffer, offset);
P_INLINE_DATA(p, draw_addr >> 32);
P_INLINE_DATA(p, draw_addr);
while (drawCount) {
const uint32_t count = MIN2(drawCount, max_draws_per_push);
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 5);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 4);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW_INDIRECT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
P_INLINE_DATA(p, count);
P_INLINE_DATA(p, (stride - sizeof(VkDrawIndirectCommand)) / 4);
nvk_mme_draw_indexed_indirect(struct mme_builder *b)
{
nvk_mme_load_to_scratch(b, DRAW_BEGIN);
- nvk_mme_load_to_scratch(b, VIEW_MASK);
if (b->devinfo->cls_eng3d >= TURING_A) {
struct mme_value64 draw_addr = mme_load_addr64(b);
});
if (nvk_cmd_buffer_3d_cls(cmd) >= TURING_A) {
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 9);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 8);
P_IMMD(p, NVC597, SET_MME_DATA_FIFO_CONFIG, FIFO_SIZE_SIZE_4KB);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW_INDEXED_INDIRECT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
uint64_t draw_addr = nvk_buffer_address(buffer, offset);
P_INLINE_DATA(p, draw_addr >> 32);
P_INLINE_DATA(p, draw_addr);
while (drawCount) {
const uint32_t count = MIN2(drawCount, max_draws_per_push);
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 5);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 4);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW_INDEXED_INDIRECT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
P_INLINE_DATA(p, count);
P_INLINE_DATA(p, (stride - sizeof(VkDrawIndexedIndirectCommand)) / 4);
return;
nvk_mme_load_to_scratch(b, DRAW_BEGIN);
- nvk_mme_load_to_scratch(b, VIEW_MASK);
struct mme_value64 draw_addr = mme_load_addr64(b);
struct mme_value64 draw_count_addr = mme_load_addr64(b);
.split_mode = SPLIT_MODE_NORMAL_BEGIN_NORMAL_END,
});
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 11);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 10);
P_IMMD(p, NVC597, SET_MME_DATA_FIFO_CONFIG, FIFO_SIZE_SIZE_4KB);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW_INDIRECT_COUNT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
uint64_t draw_addr = nvk_buffer_address(buffer, offset);
P_INLINE_DATA(p, draw_addr >> 32);
P_INLINE_DATA(p, draw_addr);
return;
nvk_mme_load_to_scratch(b, DRAW_BEGIN);
- nvk_mme_load_to_scratch(b, VIEW_MASK);
struct mme_value64 draw_addr = mme_load_addr64(b);
struct mme_value64 draw_count_addr = mme_load_addr64(b);
.split_mode = SPLIT_MODE_NORMAL_BEGIN_NORMAL_END,
});
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 11);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 10);
P_IMMD(p, NVC597, SET_MME_DATA_FIFO_CONFIG, FIFO_SIZE_SIZE_4KB);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_DRAW_INDEXED_INDIRECT_COUNT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
uint64_t draw_addr = nvk_buffer_address(buffer, offset);
P_INLINE_DATA(p, draw_addr >> 32);
P_INLINE_DATA(p, draw_addr);
nvk_mme_xfb_draw_indirect(struct mme_builder *b)
{
nvk_mme_load_to_scratch(b, DRAW_BEGIN);
- nvk_mme_load_to_scratch(b, VIEW_MASK);
struct mme_value instance_count = mme_load(b);
struct mme_value first_instance = mme_load(b);
});
if (nvk_cmd_buffer_3d_cls(cmd) >= TURING_A) {
- struct nv_push *p = nvk_cmd_buffer_push(cmd, 13);
+ struct nv_push *p = nvk_cmd_buffer_push(cmd, 12);
P_IMMD(p, NV9097, SET_DRAW_AUTO_START, counterOffset);
P_IMMD(p, NV9097, SET_DRAW_AUTO_STRIDE, vertexStride);
P_IMMD(p, NVC597, SET_MME_DATA_FIFO_CONFIG, FIFO_SIZE_SIZE_4KB);
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_XFB_DRAW_INDIRECT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
P_INLINE_DATA(p, instanceCount);
P_INLINE_DATA(p, firstInstance);
uint64_t counter_addr = nvk_buffer_address(counter_buffer,
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_XFB_DRAW_INDIRECT));
P_INLINE_DATA(p, begin);
- P_INLINE_DATA(p, cmd->state.gfx.render.view_mask);
P_INLINE_DATA(p, instanceCount);
P_INLINE_DATA(p, firstInstance);
nv_push_update_count(p, 1);