[Vulkan] Implement support for color_exp_bias.
This commit is contained in:
@@ -741,6 +741,14 @@ bool PipelineCache::SetDynamicState(VkCommandBuffer command_buffer,
|
||||
SetShadowRegister(®s.sq_context_misc, XE_GPU_REG_SQ_CONTEXT_MISC);
|
||||
push_constants_dirty |=
|
||||
SetShadowRegister(®s.rb_colorcontrol, XE_GPU_REG_RB_COLORCONTROL);
|
||||
push_constants_dirty |=
|
||||
SetShadowRegister(®s.rb_color_info, XE_GPU_REG_RB_COLOR_INFO);
|
||||
push_constants_dirty |=
|
||||
SetShadowRegister(®s.rb_color1_info, XE_GPU_REG_RB_COLOR1_INFO);
|
||||
push_constants_dirty |=
|
||||
SetShadowRegister(®s.rb_color2_info, XE_GPU_REG_RB_COLOR2_INFO);
|
||||
push_constants_dirty |=
|
||||
SetShadowRegister(®s.rb_color3_info, XE_GPU_REG_RB_COLOR3_INFO);
|
||||
push_constants_dirty |=
|
||||
SetShadowRegister(®s.rb_alpha_ref, XE_GPU_REG_RB_ALPHA_REF);
|
||||
push_constants_dirty |=
|
||||
@@ -803,6 +811,17 @@ bool PipelineCache::SetDynamicState(VkCommandBuffer command_buffer,
|
||||
push_constants.point_size[1] =
|
||||
static_cast<float>((regs.pa_su_point_size & 0x0000ffff)) / 8.0f;
|
||||
|
||||
reg::RB_COLOR_INFO color_info[4] = {
|
||||
regs.rb_color_info,
|
||||
regs.rb_color1_info,
|
||||
regs.rb_color2_info,
|
||||
regs.rb_color3_info,
|
||||
};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
push_constants.color_exp_bias[i] =
|
||||
static_cast<float>(1 << color_info[i].color_exp_bias);
|
||||
}
|
||||
|
||||
// Alpha testing -- ALPHAREF, ALPHAFUNC, ALPHATESTENABLE
|
||||
// Emulated in shader.
|
||||
// if(ALPHATESTENABLE && frag_out.a [<=/ALPHAFUNC] ALPHAREF) discard;
|
||||
|
||||
Reference in New Issue
Block a user