mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-02 08:43:16 +00:00
Proper MSAA surfaces support (#1560)
This commit is contained in:
parent
c83ac654ce
commit
c55d7fbb6a
3 changed files with 116 additions and 6 deletions
|
@ -357,6 +357,8 @@ bool PipelineCache::RefreshGraphicsKey() {
|
|||
}
|
||||
}
|
||||
|
||||
u32 num_samples = 1u;
|
||||
|
||||
// Second pass to fill remain CB pipeline key data
|
||||
for (auto cb = 0u, remapped_cb = 0u; cb < Liverpool::NumColorBuffers; ++cb) {
|
||||
auto const& col_buf = regs.color_buffers[cb];
|
||||
|
@ -373,8 +375,16 @@ bool PipelineCache::RefreshGraphicsKey() {
|
|||
key.write_masks[remapped_cb] = vk::ColorComponentFlags{regs.color_target_mask.GetMask(cb)};
|
||||
key.cb_shader_mask.SetMask(remapped_cb, regs.color_shader_mask.GetMask(cb));
|
||||
|
||||
num_samples = std::max(num_samples, 1u << col_buf.attrib.num_samples_log2);
|
||||
|
||||
++remapped_cb;
|
||||
}
|
||||
|
||||
// It seems that the number of samples > 1 set in the AA config doesn't mean we're always
|
||||
// rendering with MSAA, so we need to derive MS ratio from the CB settings.
|
||||
num_samples = std::max(num_samples, regs.depth_buffer.NumSamples());
|
||||
key.num_samples = num_samples;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue