mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
nvk: Support extendedDynamicState3ColorBlendEnable
This is needed for EXT_shader_object. Move state to dynamic. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
This commit is contained in:
parent
b24cbb0b29
commit
e27b4855f7
3 changed files with 10 additions and 3 deletions
|
|
@ -446,6 +446,7 @@ nvk_cmd_buffer_dirty_render_pass(struct nvk_cmd_buffer *cmd)
|
|||
|
||||
/* These depend on color attachment count */
|
||||
BITSET_SET(dyn->dirty, MESA_VK_DYNAMIC_CB_COLOR_WRITE_ENABLES);
|
||||
BITSET_SET(dyn->dirty, MESA_VK_DYNAMIC_CB_BLEND_ENABLES);
|
||||
|
||||
/* These depend on the depth/stencil format */
|
||||
BITSET_SET(dyn->dirty, MESA_VK_DYNAMIC_DS_DEPTH_TEST_ENABLE);
|
||||
|
|
@ -1596,7 +1597,8 @@ nvk_flush_cb_state(struct nvk_cmd_buffer *cmd)
|
|||
const struct vk_dynamic_graphics_state *dyn =
|
||||
&cmd->vk.dynamic_graphics_state;
|
||||
|
||||
struct nv_push *p = nvk_cmd_buffer_push(cmd, 9 + 4 * NVK_MAX_RTS);
|
||||
struct nv_push *p =
|
||||
nvk_cmd_buffer_push(cmd, 13 + 2 * render->color_att_count);
|
||||
|
||||
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_CB_LOGIC_OP_ENABLE))
|
||||
P_IMMD(p, NV9097, SET_LOGIC_OP, dyn->cb.logic_op_enable);
|
||||
|
|
@ -1606,6 +1608,12 @@ nvk_flush_cb_state(struct nvk_cmd_buffer *cmd)
|
|||
P_IMMD(p, NV9097, SET_LOGIC_OP_FUNC, func);
|
||||
}
|
||||
|
||||
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_CB_BLEND_ENABLES)) {
|
||||
for (uint8_t a = 0; a < render->color_att_count; a++) {
|
||||
P_IMMD(p, NV9097, SET_BLEND(a), dyn->cb.attachments[a].blend_enable);
|
||||
}
|
||||
}
|
||||
|
||||
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_CB_COLOR_WRITE_ENABLES)) {
|
||||
uint32_t color_write_enables = 0x0;
|
||||
for (uint8_t a = 0; a < render->color_att_count; a++) {
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ emit_pipeline_cb_state(struct nv_push *p,
|
|||
{
|
||||
for (uint32_t a = 0; a < cb->attachment_count; a++) {
|
||||
const struct vk_color_blend_attachment_state *att = &cb->attachments[a];
|
||||
P_IMMD(p, NV9097, SET_BLEND(a), att->blend_enable);
|
||||
|
||||
P_MTHD(p, NV9097, SET_BLEND_PER_TARGET_SEPARATE_FOR_ALPHA(a));
|
||||
P_NV9097_SET_BLEND_PER_TARGET_SEPARATE_FOR_ALPHA(p, a, ENABLE_TRUE);
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ nvk_get_device_features(const struct nv_device_info *info,
|
|||
.extendedDynamicState3AlphaToCoverageEnable = false,
|
||||
.extendedDynamicState3AlphaToOneEnable = false,
|
||||
.extendedDynamicState3LogicOpEnable = true,
|
||||
.extendedDynamicState3ColorBlendEnable = false,
|
||||
.extendedDynamicState3ColorBlendEnable = true,
|
||||
.extendedDynamicState3ColorBlendEquation = false,
|
||||
.extendedDynamicState3ColorWriteMask = false,
|
||||
.extendedDynamicState3RasterizationStream = false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue