mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-05 18:23:39 -04:00
renderer_vulkan: Derive framebuffer sample-count from attachments
Derive the framebuffer sample-count from the input color and depth operands. Similar to how `res_scale` is determined.
This commit is contained in:
parent
177edd228e
commit
02eb015d36
3 changed files with 2 additions and 4 deletions
|
|
@ -27,8 +27,7 @@ struct FramebufferParams {
|
|||
u32 color_level;
|
||||
u32 depth_level;
|
||||
bool shadow_rendering;
|
||||
u8 sample_count;
|
||||
INSERT_PADDING_BYTES(2);
|
||||
INSERT_PADDING_BYTES(3);
|
||||
|
||||
bool operator==(const FramebufferParams& params) const noexcept {
|
||||
return std::memcmp(this, ¶ms, sizeof(FramebufferParams)) == 0;
|
||||
|
|
|
|||
|
|
@ -780,7 +780,6 @@ FramebufferHelper<T> RasterizerCache<T>::GetFramebufferSurfaces(bool using_color
|
|||
.color_level = color_level,
|
||||
.depth_level = depth_level,
|
||||
.shadow_rendering = regs.framebuffer.IsShadowRendering(),
|
||||
.sample_count = sample_count,
|
||||
};
|
||||
|
||||
auto [it, new_framebuffer] = framebuffers.try_emplace(fb_params);
|
||||
|
|
|
|||
|
|
@ -1603,7 +1603,7 @@ Framebuffer::Framebuffer(TextureRuntime& runtime, const VideoCore::FramebufferPa
|
|||
Surface* color, Surface* depth)
|
||||
: VideoCore::FramebufferParams{params}, instance{runtime.GetInstance()},
|
||||
res_scale{color ? color->res_scale : (depth ? depth->res_scale : 1u)},
|
||||
sample_count{params.sample_count} {
|
||||
sample_count{color ? color->sample_count : (depth ? depth->sample_count : 1u)} {
|
||||
auto& renderpass_cache = runtime.GetRenderpassCache();
|
||||
if (shadow_rendering && !color) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue