renderer_vulkan: Fix ConvertDS24S8ToRGBA8 image targets

Ensure that the Multi-Sample texture is used for the destination color image as well. Should the dest image be MSAA too? Or should all the values be resolved into a minimum depth and some combination of stencil-values here?
This commit is contained in:
Wunkolo 2026-04-28 22:30:13 -07:00
parent 7b908bb4bc
commit 492304e215
2 changed files with 5 additions and 5 deletions

View file

@ -17,10 +17,10 @@ layout(push_constant, std140) uniform ComputeInfo {
};
void main() {
int sample_count = textureSamples(depth);
ivec2 src_coord = src_offset + ivec2(gl_GlobalInvocationID.xy);
ivec2 dst_coord = dst_offset + ivec2(gl_GlobalInvocationID.xy);
int sample_count = textureSamples(depth);
for(int sample_index = 0; sample_index < sample_count; ++sample_index)
{
highp uint depth_val = uint(texelFetch(depth, src_coord, sample_index).x * (exp2(32.0) - 1.0));

View file

@ -421,12 +421,12 @@ bool BlitHelper::ConvertDS24S8ToRGBA8(Surface& source, Surface& dest,
update_queue.AddImageSampler(descriptor_set, 1, 0,
source.ImageView(ViewType::Stencil, src_type), VK_NULL_HANDLE,
vk::ImageLayout::eDepthStencilReadOnlyOptimal);
update_queue.AddStorageImage(descriptor_set, 2, dest.ImageView());
update_queue.AddStorageImage(descriptor_set, 2, dest.ImageView(ViewType::Sample, src_type));
renderpass_cache.EndRendering();
scheduler.Record([this, pipeline, descriptor_set, copy, src_image = source.Image(),
dst_image = dest.Image()](vk::CommandBuffer cmdbuf) {
scheduler.Record([this, pipeline, descriptor_set, copy, src_image = source.Image(src_type),
dst_image = dest.Image(src_type)](vk::CommandBuffer cmdbuf) {
const std::array pre_barriers = {
vk::ImageMemoryBarrier{
.srcAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentWrite,