radv: do not translate logic op during gfx info initialization
For switching to the common graphics pipeline state. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
This commit is contained in:
@@ -701,7 +701,7 @@ radv_pipeline_init_blend_state(struct radv_graphics_pipeline *pipeline,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (info->cb.logic_op_enable)
|
if (info->cb.logic_op_enable)
|
||||||
cb_color_control |= S_028808_ROP3(info->cb.logic_op);
|
cb_color_control |= S_028808_ROP3(si_translate_blend_logic_op(info->cb.logic_op));
|
||||||
else
|
else
|
||||||
cb_color_control |= S_028808_ROP3(V_028808_ROP3_COPY);
|
cb_color_control |= S_028808_ROP3(V_028808_ROP3_COPY);
|
||||||
|
|
||||||
@@ -1920,7 +1920,7 @@ radv_pipeline_init_color_blend_info(struct radv_graphics_pipeline *pipeline,
|
|||||||
|
|
||||||
info.logic_op_enable = cb->logicOpEnable;
|
info.logic_op_enable = cb->logicOpEnable;
|
||||||
if (info.logic_op_enable && !(pipeline->dynamic_states & RADV_DYNAMIC_LOGIC_OP))
|
if (info.logic_op_enable && !(pipeline->dynamic_states & RADV_DYNAMIC_LOGIC_OP))
|
||||||
info.logic_op = si_translate_blend_logic_op(cb->logicOp);
|
info.logic_op = cb->logicOp;
|
||||||
|
|
||||||
const VkPipelineColorWriteCreateInfoEXT *color_write_info =
|
const VkPipelineColorWriteCreateInfoEXT *color_write_info =
|
||||||
vk_find_struct_const(cb->pNext, PIPELINE_COLOR_WRITE_CREATE_INFO_EXT);
|
vk_find_struct_const(cb->pNext, PIPELINE_COLOR_WRITE_CREATE_INFO_EXT);
|
||||||
@@ -2173,7 +2173,7 @@ radv_pipeline_init_dynamic_state(struct radv_graphics_pipeline *pipeline,
|
|||||||
|
|
||||||
if (radv_pipeline_has_color_attachments(&info->ri) && states & RADV_DYNAMIC_LOGIC_OP) {
|
if (radv_pipeline_has_color_attachments(&info->ri) && states & RADV_DYNAMIC_LOGIC_OP) {
|
||||||
if (info->cb.logic_op_enable) {
|
if (info->cb.logic_op_enable) {
|
||||||
dynamic->logic_op = info->cb.logic_op;
|
dynamic->logic_op = si_translate_blend_logic_op(info->cb.logic_op);
|
||||||
} else {
|
} else {
|
||||||
dynamic->logic_op = V_028808_ROP3_COPY;
|
dynamic->logic_op = V_028808_ROP3_COPY;
|
||||||
}
|
}
|
||||||
|
@@ -2055,7 +2055,7 @@ struct radv_rendering_info {
|
|||||||
struct radv_color_blend_info {
|
struct radv_color_blend_info {
|
||||||
bool logic_op_enable;
|
bool logic_op_enable;
|
||||||
uint8_t att_count;
|
uint8_t att_count;
|
||||||
uint16_t logic_op;
|
VkLogicOp logic_op;
|
||||||
uint32_t color_write_enable;
|
uint32_t color_write_enable;
|
||||||
float blend_constants[4];
|
float blend_constants[4];
|
||||||
struct {
|
struct {
|
||||||
|
Reference in New Issue
Block a user