[Vulkan] Simplify color/depth info access in IssueCopy.
This commit is contained in:
parent
77b097098d
commit
9655b76f68
|
@ -980,25 +980,22 @@ bool VulkanCommandProcessor::IssueCopy() {
|
||||||
DepthRenderTargetFormat depth_format;
|
DepthRenderTargetFormat depth_format;
|
||||||
if (is_color_source) {
|
if (is_color_source) {
|
||||||
// Source from a color target.
|
// Source from a color target.
|
||||||
uint32_t color_info[4] = {
|
reg::RB_COLOR_INFO color_info[4] = {
|
||||||
regs[XE_GPU_REG_RB_COLOR_INFO].u32,
|
regs[XE_GPU_REG_RB_COLOR_INFO].u32,
|
||||||
regs[XE_GPU_REG_RB_COLOR1_INFO].u32,
|
regs[XE_GPU_REG_RB_COLOR1_INFO].u32,
|
||||||
regs[XE_GPU_REG_RB_COLOR2_INFO].u32,
|
regs[XE_GPU_REG_RB_COLOR2_INFO].u32,
|
||||||
regs[XE_GPU_REG_RB_COLOR3_INFO].u32,
|
regs[XE_GPU_REG_RB_COLOR3_INFO].u32,
|
||||||
};
|
};
|
||||||
color_edram_base = color_info[copy_src_select] & 0xFFF;
|
color_edram_base = color_info[copy_src_select].color_base;
|
||||||
|
color_format = color_info[copy_src_select].color_format;
|
||||||
color_format = static_cast<ColorRenderTargetFormat>(
|
assert_true(color_info[copy_src_select].color_exp_bias == 0);
|
||||||
(color_info[copy_src_select] >> 16) & 0xF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_color_source || depth_clear_enabled) {
|
if (!is_color_source || depth_clear_enabled) {
|
||||||
// Source from or clear a depth target.
|
// Source from or clear a depth target.
|
||||||
uint32_t depth_info = regs[XE_GPU_REG_RB_DEPTH_INFO].u32;
|
reg::RB_DEPTH_INFO depth_info = {regs[XE_GPU_REG_RB_DEPTH_INFO].u32};
|
||||||
depth_edram_base = depth_info & 0xFFF;
|
depth_edram_base = depth_info.depth_base;
|
||||||
|
depth_format = depth_info.depth_format;
|
||||||
depth_format =
|
|
||||||
static_cast<DepthRenderTargetFormat>((depth_info >> 16) & 0x1);
|
|
||||||
if (!is_color_source) {
|
if (!is_color_source) {
|
||||||
copy_dest_format = DepthRenderTargetToTextureFormat(depth_format);
|
copy_dest_format = DepthRenderTargetToTextureFormat(depth_format);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue