Merge pull request #7368 from FernandoS27/vulkan-conv
Fix ART Blit detection regression and add D24S8 <-> RGBA8 conv to Vulkan
This commit is contained in:
commit
ea6fa044f3
18 changed files with 595 additions and 23 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <glad/glad.h>
|
||||
|
||||
#include "common/bit_util.h"
|
||||
#include "common/literals.h"
|
||||
#include "common/settings.h"
|
||||
#include "video_core/renderer_opengl/gl_device.h"
|
||||
|
@ -398,9 +399,6 @@ OGLTexture MakeImage(const VideoCommon::ImageInfo& info, GLenum gl_internal_form
|
|||
return GL_R32UI;
|
||||
}
|
||||
|
||||
[[nodiscard]] u32 NextPow2(u32 value) {
|
||||
return 1U << (32U - std::countl_zero(value - 1U));
|
||||
}
|
||||
} // Anonymous namespace
|
||||
|
||||
ImageBufferMap::~ImageBufferMap() {
|
||||
|
@ -527,8 +525,8 @@ void TextureCacheRuntime::CopyImage(Image& dst_image, Image& src_image,
|
|||
}
|
||||
}
|
||||
|
||||
void TextureCacheRuntime::ConvertImage(Image& dst, Image& src,
|
||||
std::span<const VideoCommon::ImageCopy> copies) {
|
||||
void TextureCacheRuntime::ReinterpretImage(Image& dst, Image& src,
|
||||
std::span<const VideoCommon::ImageCopy> copies) {
|
||||
LOG_DEBUG(Render_OpenGL, "Converting {} to {}", src.info.format, dst.info.format);
|
||||
format_conversion_pass.ConvertImage(dst, src, copies);
|
||||
}
|
||||
|
@ -1333,7 +1331,7 @@ void FormatConversionPass::ConvertImage(Image& dst_image, Image& src_image,
|
|||
const u32 copy_size = region.width * region.height * region.depth * img_bpp;
|
||||
if (pbo_size < copy_size) {
|
||||
intermediate_pbo.Create();
|
||||
pbo_size = NextPow2(copy_size);
|
||||
pbo_size = Common::NextPow2(copy_size);
|
||||
glNamedBufferData(intermediate_pbo.handle, pbo_size, nullptr, GL_STREAM_COPY);
|
||||
}
|
||||
// Copy from source to PBO
|
||||
|
|
|
@ -84,9 +84,13 @@ public:
|
|||
|
||||
u64 GetDeviceLocalMemory() const;
|
||||
|
||||
bool ShouldReinterpret([[maybe_unused]] Image& dst, [[maybe_unused]] Image& src) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void CopyImage(Image& dst, Image& src, std::span<const VideoCommon::ImageCopy> copies);
|
||||
|
||||
void ConvertImage(Image& dst, Image& src, std::span<const VideoCommon::ImageCopy> copies);
|
||||
void ReinterpretImage(Image& dst, Image& src, std::span<const VideoCommon::ImageCopy> copies);
|
||||
|
||||
void ConvertImage(Framebuffer* dst, ImageView& dst_view, ImageView& src_view, bool rescaled) {
|
||||
UNIMPLEMENTED();
|
||||
|
@ -339,7 +343,6 @@ struct TextureCacheParams {
|
|||
static constexpr bool FRAMEBUFFER_BLITS = true;
|
||||
static constexpr bool HAS_EMULATED_COPIES = true;
|
||||
static constexpr bool HAS_DEVICE_MEMORY_INFO = true;
|
||||
static constexpr bool HAS_PIXEL_FORMAT_CONVERSIONS = true;
|
||||
|
||||
using Runtime = OpenGL::TextureCacheRuntime;
|
||||
using Image = OpenGL::Image;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue