Compare commits
1 Commits
android-10
...
android-10
Author | SHA1 | Date | |
---|---|---|---|
8cb997edcf |
@ -407,10 +407,10 @@ protected:
|
|||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto base = rp.PopRaw<ProfileBase>();
|
const auto base = rp.PopRaw<ProfileBase>();
|
||||||
|
|
||||||
const auto image_data = ctx.ReadBufferA(0);
|
const auto user_data = ctx.ReadBuffer();
|
||||||
const auto user_data = ctx.ReadBufferX(0);
|
const auto image_data = ctx.ReadBuffer(1);
|
||||||
|
|
||||||
LOG_INFO(Service_ACC, "called, username='{}', timestamp={:016X}, uuid=0x{}",
|
LOG_DEBUG(Service_ACC, "called, username='{}', timestamp={:016X}, uuid=0x{}",
|
||||||
Common::StringFromFixedZeroTerminatedBuffer(
|
Common::StringFromFixedZeroTerminatedBuffer(
|
||||||
reinterpret_cast<const char*>(base.username.data()), base.username.size()),
|
reinterpret_cast<const char*>(base.username.data()), base.username.size()),
|
||||||
base.timestamp, base.user_uuid.RawString());
|
base.timestamp, base.user_uuid.RawString());
|
||||||
|
@ -23,17 +23,6 @@
|
|||||||
#include "core/hle/service/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
namespace {
|
|
||||||
static thread_local std::array read_buffer_data_a{
|
|
||||||
Common::ScratchBuffer<u8>(),
|
|
||||||
Common::ScratchBuffer<u8>(),
|
|
||||||
};
|
|
||||||
static thread_local std::array read_buffer_data_x{
|
|
||||||
Common::ScratchBuffer<u8>(),
|
|
||||||
Common::ScratchBuffer<u8>(),
|
|
||||||
};
|
|
||||||
} // Anonymous namespace
|
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
|
|
||||||
SessionRequestHandler::SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_)
|
SessionRequestHandler::SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_)
|
||||||
@ -339,57 +328,26 @@ std::vector<u8> HLERequestContext::ReadBufferCopy(std::size_t buffer_index) cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::span<const u8> HLERequestContext::ReadBufferA(std::size_t buffer_index) const {
|
|
||||||
static thread_local std::array read_buffer_a{
|
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
|
||||||
};
|
|
||||||
|
|
||||||
ASSERT_OR_EXECUTE_MSG(
|
|
||||||
BufferDescriptorA().size() > buffer_index, { return {}; },
|
|
||||||
"BufferDescriptorA invalid buffer_index {}", buffer_index);
|
|
||||||
auto& read_buffer = read_buffer_a[buffer_index];
|
|
||||||
return read_buffer.Read(BufferDescriptorA()[buffer_index].Address(),
|
|
||||||
BufferDescriptorA()[buffer_index].Size(),
|
|
||||||
&read_buffer_data_a[buffer_index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::span<const u8> HLERequestContext::ReadBufferX(std::size_t buffer_index) const {
|
|
||||||
static thread_local std::array read_buffer_x{
|
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
|
||||||
};
|
|
||||||
|
|
||||||
ASSERT_OR_EXECUTE_MSG(
|
|
||||||
BufferDescriptorX().size() > buffer_index, { return {}; },
|
|
||||||
"BufferDescriptorX invalid buffer_index {}", buffer_index);
|
|
||||||
auto& read_buffer = read_buffer_x[buffer_index];
|
|
||||||
return read_buffer.Read(BufferDescriptorX()[buffer_index].Address(),
|
|
||||||
BufferDescriptorX()[buffer_index].Size(),
|
|
||||||
&read_buffer_data_x[buffer_index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::span<const u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const {
|
std::span<const u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const {
|
||||||
static thread_local std::array read_buffer_a{
|
static thread_local std::array read_buffer_a{
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
||||||
};
|
};
|
||||||
|
static thread_local std::array read_buffer_data_a{
|
||||||
|
Common::ScratchBuffer<u8>(),
|
||||||
|
Common::ScratchBuffer<u8>(),
|
||||||
|
};
|
||||||
static thread_local std::array read_buffer_x{
|
static thread_local std::array read_buffer_x{
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead>(memory, 0, 0),
|
||||||
};
|
};
|
||||||
|
static thread_local std::array read_buffer_data_x{
|
||||||
|
Common::ScratchBuffer<u8>(),
|
||||||
|
Common::ScratchBuffer<u8>(),
|
||||||
|
};
|
||||||
|
|
||||||
const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
|
const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
|
||||||
BufferDescriptorA()[buffer_index].Size()};
|
BufferDescriptorA()[buffer_index].Size()};
|
||||||
const bool is_buffer_x{BufferDescriptorX().size() > buffer_index &&
|
|
||||||
BufferDescriptorX()[buffer_index].Size()};
|
|
||||||
|
|
||||||
if (is_buffer_a && is_buffer_x) {
|
|
||||||
LOG_WARNING(Input, "Both buffer descriptors are available a.size={}, x.size={}",
|
|
||||||
BufferDescriptorA()[buffer_index].Size(),
|
|
||||||
BufferDescriptorX()[buffer_index].Size());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_buffer_a) {
|
if (is_buffer_a) {
|
||||||
ASSERT_OR_EXECUTE_MSG(
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
BufferDescriptorA().size() > buffer_index, { return {}; },
|
BufferDescriptorA().size() > buffer_index, { return {}; },
|
||||||
|
@ -253,12 +253,6 @@ public:
|
|||||||
return domain_message_header.has_value();
|
return domain_message_header.has_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function to get a span of a buffer using the buffer descriptor A
|
|
||||||
[[nodiscard]] std::span<const u8> ReadBufferA(std::size_t buffer_index = 0) const;
|
|
||||||
|
|
||||||
/// Helper function to get a span of a buffer using the buffer descriptor X
|
|
||||||
[[nodiscard]] std::span<const u8> ReadBufferX(std::size_t buffer_index = 0) const;
|
|
||||||
|
|
||||||
/// Helper function to get a span of a buffer using the appropriate buffer descriptor
|
/// Helper function to get a span of a buffer using the appropriate buffer descriptor
|
||||||
[[nodiscard]] std::span<const u8> ReadBuffer(std::size_t buffer_index = 0) const;
|
[[nodiscard]] std::span<const u8> ReadBuffer(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
@ -58,8 +58,14 @@ private:
|
|||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto process_id = rp.PopRaw<u64>();
|
const auto process_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
const auto data1 = ctx.ReadBufferA(0);
|
const auto data1 = ctx.ReadBuffer(0);
|
||||||
const auto data2 = ctx.ReadBufferX(0);
|
const auto data2 = [&ctx] {
|
||||||
|
if (ctx.CanReadBuffer(1)) {
|
||||||
|
return ctx.ReadBuffer(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::span<const u8>{};
|
||||||
|
}();
|
||||||
|
|
||||||
LOG_DEBUG(Service_PREPO,
|
LOG_DEBUG(Service_PREPO,
|
||||||
"called, type={:02X}, process_id={:016X}, data1_size={:016X}, data2_size={:016X}",
|
"called, type={:02X}, process_id={:016X}, data1_size={:016X}, data2_size={:016X}",
|
||||||
@ -79,8 +85,14 @@ private:
|
|||||||
const auto user_id = rp.PopRaw<u128>();
|
const auto user_id = rp.PopRaw<u128>();
|
||||||
const auto process_id = rp.PopRaw<u64>();
|
const auto process_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
const auto data1 = ctx.ReadBufferA(0);
|
const auto data1 = ctx.ReadBuffer(0);
|
||||||
const auto data2 = ctx.ReadBufferX(0);
|
const auto data2 = [&ctx] {
|
||||||
|
if (ctx.CanReadBuffer(1)) {
|
||||||
|
return ctx.ReadBuffer(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::span<const u8>{};
|
||||||
|
}();
|
||||||
|
|
||||||
LOG_DEBUG(Service_PREPO,
|
LOG_DEBUG(Service_PREPO,
|
||||||
"called, type={:02X}, user_id={:016X}{:016X}, process_id={:016X}, "
|
"called, type={:02X}, user_id={:016X}{:016X}, process_id={:016X}, "
|
||||||
@ -125,8 +137,14 @@ private:
|
|||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto title_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
const auto data1 = ctx.ReadBufferA(0);
|
const auto data1 = ctx.ReadBuffer(0);
|
||||||
const auto data2 = ctx.ReadBufferX(0);
|
const auto data2 = [&ctx] {
|
||||||
|
if (ctx.CanReadBuffer(1)) {
|
||||||
|
return ctx.ReadBuffer(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::span<const u8>{};
|
||||||
|
}();
|
||||||
|
|
||||||
LOG_DEBUG(Service_PREPO, "called, title_id={:016X}, data1_size={:016X}, data2_size={:016X}",
|
LOG_DEBUG(Service_PREPO, "called, title_id={:016X}, data1_size={:016X}, data2_size={:016X}",
|
||||||
title_id, data1.size(), data2.size());
|
title_id, data1.size(), data2.size());
|
||||||
@ -143,8 +161,14 @@ private:
|
|||||||
const auto user_id = rp.PopRaw<u128>();
|
const auto user_id = rp.PopRaw<u128>();
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto title_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
const auto data1 = ctx.ReadBufferA(0);
|
const auto data1 = ctx.ReadBuffer(0);
|
||||||
const auto data2 = ctx.ReadBufferX(0);
|
const auto data2 = [&ctx] {
|
||||||
|
if (ctx.CanReadBuffer(1)) {
|
||||||
|
return ctx.ReadBuffer(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::span<const u8>{};
|
||||||
|
}();
|
||||||
|
|
||||||
LOG_DEBUG(Service_PREPO,
|
LOG_DEBUG(Service_PREPO,
|
||||||
"called, user_id={:016X}{:016X}, title_id={:016X}, data1_size={:016X}, "
|
"called, user_id={:016X}{:016X}, title_id={:016X}, data1_size={:016X}, "
|
||||||
|
@ -46,8 +46,8 @@ TEST_CASE("UniqueFunction", "[common]") {
|
|||||||
Noisy noisy;
|
Noisy noisy;
|
||||||
REQUIRE(noisy.state == "Default constructed");
|
REQUIRE(noisy.state == "Default constructed");
|
||||||
|
|
||||||
Common::UniqueFunction<void> func = [noisy_inner = std::move(noisy)] {
|
Common::UniqueFunction<void> func = [noisy = std::move(noisy)] {
|
||||||
REQUIRE(noisy_inner.state == "Move constructed");
|
REQUIRE(noisy.state == "Move constructed");
|
||||||
};
|
};
|
||||||
REQUIRE(noisy.state == "Moved away");
|
REQUIRE(noisy.state == "Moved away");
|
||||||
func();
|
func();
|
||||||
@ -101,7 +101,7 @@ TEST_CASE("UniqueFunction", "[common]") {
|
|||||||
};
|
};
|
||||||
Foo object{&num_destroyed};
|
Foo object{&num_destroyed};
|
||||||
{
|
{
|
||||||
Common::UniqueFunction<void> func = [object_inner = std::move(object)] {};
|
Common::UniqueFunction<void> func = [object = std::move(object)] {};
|
||||||
REQUIRE(num_destroyed == 0);
|
REQUIRE(num_destroyed == 0);
|
||||||
}
|
}
|
||||||
REQUIRE(num_destroyed == 1);
|
REQUIRE(num_destroyed == 1);
|
||||||
|
@ -19,7 +19,6 @@ set(SHADER_FILES
|
|||||||
block_linear_unswizzle_2d.comp
|
block_linear_unswizzle_2d.comp
|
||||||
block_linear_unswizzle_3d.comp
|
block_linear_unswizzle_3d.comp
|
||||||
convert_abgr8_to_d24s8.frag
|
convert_abgr8_to_d24s8.frag
|
||||||
convert_abgr8_to_d32f.frag
|
|
||||||
convert_d32f_to_abgr8.frag
|
convert_d32f_to_abgr8.frag
|
||||||
convert_d24s8_to_abgr8.frag
|
convert_d24s8_to_abgr8.frag
|
||||||
convert_depth_to_float.frag
|
convert_depth_to_float.frag
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#version 450
|
|
||||||
|
|
||||||
layout(binding = 0) uniform sampler2D color_texture;
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
ivec2 coord = ivec2(gl_FragCoord.xy);
|
|
||||||
vec4 color = texelFetch(color_texture, coord, 0).abgr;
|
|
||||||
|
|
||||||
float value = color.a * (color.r + color.g + color.b) / 3.0f;
|
|
||||||
|
|
||||||
gl_FragDepth = value;
|
|
||||||
}
|
|
@ -9,6 +9,6 @@ layout(location = 0) out vec4 color;
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
ivec2 coord = ivec2(gl_FragCoord.xy);
|
ivec2 coord = ivec2(gl_FragCoord.xy);
|
||||||
float depth = texelFetch(depth_tex, coord, 0).r;
|
float depth = textureLod(depth_tex, coord, 0).r;
|
||||||
color = vec4(depth, depth, depth, 1.0);
|
color = vec4(depth, depth, depth, 1.0);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "video_core/host_shaders/blit_color_float_frag_spv.h"
|
#include "video_core/host_shaders/blit_color_float_frag_spv.h"
|
||||||
#include "video_core/host_shaders/convert_abgr8_to_d24s8_frag_spv.h"
|
#include "video_core/host_shaders/convert_abgr8_to_d24s8_frag_spv.h"
|
||||||
#include "video_core/host_shaders/convert_abgr8_to_d32f_frag_spv.h"
|
|
||||||
#include "video_core/host_shaders/convert_d24s8_to_abgr8_frag_spv.h"
|
#include "video_core/host_shaders/convert_d24s8_to_abgr8_frag_spv.h"
|
||||||
#include "video_core/host_shaders/convert_d32f_to_abgr8_frag_spv.h"
|
#include "video_core/host_shaders/convert_d32f_to_abgr8_frag_spv.h"
|
||||||
#include "video_core/host_shaders/convert_depth_to_float_frag_spv.h"
|
#include "video_core/host_shaders/convert_depth_to_float_frag_spv.h"
|
||||||
@ -435,7 +434,6 @@ BlitImageHelper::BlitImageHelper(const Device& device_, Scheduler& scheduler_,
|
|||||||
convert_depth_to_float_frag(BuildShader(device, CONVERT_DEPTH_TO_FLOAT_FRAG_SPV)),
|
convert_depth_to_float_frag(BuildShader(device, CONVERT_DEPTH_TO_FLOAT_FRAG_SPV)),
|
||||||
convert_float_to_depth_frag(BuildShader(device, CONVERT_FLOAT_TO_DEPTH_FRAG_SPV)),
|
convert_float_to_depth_frag(BuildShader(device, CONVERT_FLOAT_TO_DEPTH_FRAG_SPV)),
|
||||||
convert_abgr8_to_d24s8_frag(BuildShader(device, CONVERT_ABGR8_TO_D24S8_FRAG_SPV)),
|
convert_abgr8_to_d24s8_frag(BuildShader(device, CONVERT_ABGR8_TO_D24S8_FRAG_SPV)),
|
||||||
convert_abgr8_to_d32f_frag(BuildShader(device, CONVERT_ABGR8_TO_D32F_FRAG_SPV)),
|
|
||||||
convert_d32f_to_abgr8_frag(BuildShader(device, CONVERT_D32F_TO_ABGR8_FRAG_SPV)),
|
convert_d32f_to_abgr8_frag(BuildShader(device, CONVERT_D32F_TO_ABGR8_FRAG_SPV)),
|
||||||
convert_d24s8_to_abgr8_frag(BuildShader(device, CONVERT_D24S8_TO_ABGR8_FRAG_SPV)),
|
convert_d24s8_to_abgr8_frag(BuildShader(device, CONVERT_D24S8_TO_ABGR8_FRAG_SPV)),
|
||||||
convert_s8d24_to_abgr8_frag(BuildShader(device, CONVERT_S8D24_TO_ABGR8_FRAG_SPV)),
|
convert_s8d24_to_abgr8_frag(BuildShader(device, CONVERT_S8D24_TO_ABGR8_FRAG_SPV)),
|
||||||
@ -561,13 +559,6 @@ void BlitImageHelper::ConvertABGR8ToD24S8(const Framebuffer* dst_framebuffer,
|
|||||||
Convert(*convert_abgr8_to_d24s8_pipeline, dst_framebuffer, src_image_view);
|
Convert(*convert_abgr8_to_d24s8_pipeline, dst_framebuffer, src_image_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlitImageHelper::ConvertABGR8ToD32F(const Framebuffer* dst_framebuffer,
|
|
||||||
const ImageView& src_image_view) {
|
|
||||||
ConvertPipelineDepthTargetEx(convert_abgr8_to_d32f_pipeline, dst_framebuffer->RenderPass(),
|
|
||||||
convert_abgr8_to_d32f_frag);
|
|
||||||
Convert(*convert_abgr8_to_d32f_pipeline, dst_framebuffer, src_image_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlitImageHelper::ConvertD32FToABGR8(const Framebuffer* dst_framebuffer,
|
void BlitImageHelper::ConvertD32FToABGR8(const Framebuffer* dst_framebuffer,
|
||||||
ImageView& src_image_view) {
|
ImageView& src_image_view) {
|
||||||
ConvertPipelineColorTargetEx(convert_d32f_to_abgr8_pipeline, dst_framebuffer->RenderPass(),
|
ConvertPipelineColorTargetEx(convert_d32f_to_abgr8_pipeline, dst_framebuffer->RenderPass(),
|
||||||
|
@ -67,8 +67,6 @@ public:
|
|||||||
|
|
||||||
void ConvertABGR8ToD24S8(const Framebuffer* dst_framebuffer, const ImageView& src_image_view);
|
void ConvertABGR8ToD24S8(const Framebuffer* dst_framebuffer, const ImageView& src_image_view);
|
||||||
|
|
||||||
void ConvertABGR8ToD32F(const Framebuffer* dst_framebuffer, const ImageView& src_image_view);
|
|
||||||
|
|
||||||
void ConvertD32FToABGR8(const Framebuffer* dst_framebuffer, ImageView& src_image_view);
|
void ConvertD32FToABGR8(const Framebuffer* dst_framebuffer, ImageView& src_image_view);
|
||||||
|
|
||||||
void ConvertD24S8ToABGR8(const Framebuffer* dst_framebuffer, ImageView& src_image_view);
|
void ConvertD24S8ToABGR8(const Framebuffer* dst_framebuffer, ImageView& src_image_view);
|
||||||
@ -132,7 +130,6 @@ private:
|
|||||||
vk::ShaderModule convert_depth_to_float_frag;
|
vk::ShaderModule convert_depth_to_float_frag;
|
||||||
vk::ShaderModule convert_float_to_depth_frag;
|
vk::ShaderModule convert_float_to_depth_frag;
|
||||||
vk::ShaderModule convert_abgr8_to_d24s8_frag;
|
vk::ShaderModule convert_abgr8_to_d24s8_frag;
|
||||||
vk::ShaderModule convert_abgr8_to_d32f_frag;
|
|
||||||
vk::ShaderModule convert_d32f_to_abgr8_frag;
|
vk::ShaderModule convert_d32f_to_abgr8_frag;
|
||||||
vk::ShaderModule convert_d24s8_to_abgr8_frag;
|
vk::ShaderModule convert_d24s8_to_abgr8_frag;
|
||||||
vk::ShaderModule convert_s8d24_to_abgr8_frag;
|
vk::ShaderModule convert_s8d24_to_abgr8_frag;
|
||||||
@ -152,7 +149,6 @@ private:
|
|||||||
vk::Pipeline convert_d16_to_r16_pipeline;
|
vk::Pipeline convert_d16_to_r16_pipeline;
|
||||||
vk::Pipeline convert_r16_to_d16_pipeline;
|
vk::Pipeline convert_r16_to_d16_pipeline;
|
||||||
vk::Pipeline convert_abgr8_to_d24s8_pipeline;
|
vk::Pipeline convert_abgr8_to_d24s8_pipeline;
|
||||||
vk::Pipeline convert_abgr8_to_d32f_pipeline;
|
|
||||||
vk::Pipeline convert_d32f_to_abgr8_pipeline;
|
vk::Pipeline convert_d32f_to_abgr8_pipeline;
|
||||||
vk::Pipeline convert_d24s8_to_abgr8_pipeline;
|
vk::Pipeline convert_d24s8_to_abgr8_pipeline;
|
||||||
vk::Pipeline convert_s8d24_to_abgr8_pipeline;
|
vk::Pipeline convert_s8d24_to_abgr8_pipeline;
|
||||||
|
@ -1194,11 +1194,6 @@ void TextureCacheRuntime::ConvertImage(Framebuffer* dst, ImageView& dst_view, Im
|
|||||||
return blit_image_helper.ConvertD16ToR16(dst, src_view);
|
return blit_image_helper.ConvertD16ToR16(dst, src_view);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PixelFormat::A8B8G8R8_SRGB:
|
|
||||||
if (src_view.format == PixelFormat::D32_FLOAT) {
|
|
||||||
return blit_image_helper.ConvertD32FToABGR8(dst, src_view);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PixelFormat::A8B8G8R8_UNORM:
|
case PixelFormat::A8B8G8R8_UNORM:
|
||||||
if (src_view.format == PixelFormat::S8_UINT_D24_UNORM) {
|
if (src_view.format == PixelFormat::S8_UINT_D24_UNORM) {
|
||||||
return blit_image_helper.ConvertD24S8ToABGR8(dst, src_view);
|
return blit_image_helper.ConvertD24S8ToABGR8(dst, src_view);
|
||||||
@ -1210,16 +1205,6 @@ void TextureCacheRuntime::ConvertImage(Framebuffer* dst, ImageView& dst_view, Im
|
|||||||
return blit_image_helper.ConvertD32FToABGR8(dst, src_view);
|
return blit_image_helper.ConvertD32FToABGR8(dst, src_view);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PixelFormat::B8G8R8A8_SRGB:
|
|
||||||
if (src_view.format == PixelFormat::D32_FLOAT) {
|
|
||||||
return blit_image_helper.ConvertD32FToABGR8(dst, src_view);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PixelFormat::B8G8R8A8_UNORM:
|
|
||||||
if (src_view.format == PixelFormat::D32_FLOAT) {
|
|
||||||
return blit_image_helper.ConvertD32FToABGR8(dst, src_view);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PixelFormat::R32_FLOAT:
|
case PixelFormat::R32_FLOAT:
|
||||||
if (src_view.format == PixelFormat::D32_FLOAT) {
|
if (src_view.format == PixelFormat::D32_FLOAT) {
|
||||||
return blit_image_helper.ConvertD32ToR32(dst, src_view);
|
return blit_image_helper.ConvertD32ToR32(dst, src_view);
|
||||||
@ -1237,12 +1222,6 @@ void TextureCacheRuntime::ConvertImage(Framebuffer* dst, ImageView& dst_view, Im
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PixelFormat::D32_FLOAT:
|
case PixelFormat::D32_FLOAT:
|
||||||
if (src_view.format == PixelFormat::A8B8G8R8_UNORM ||
|
|
||||||
src_view.format == PixelFormat::B8G8R8A8_UNORM ||
|
|
||||||
src_view.format == PixelFormat::A8B8G8R8_SRGB ||
|
|
||||||
src_view.format == PixelFormat::B8G8R8A8_SRGB) {
|
|
||||||
return blit_image_helper.ConvertABGR8ToD32F(dst, src_view);
|
|
||||||
}
|
|
||||||
if (src_view.format == PixelFormat::R32_FLOAT) {
|
if (src_view.format == PixelFormat::R32_FLOAT) {
|
||||||
return blit_image_helper.ConvertR32ToD32(dst, src_view);
|
return blit_image_helper.ConvertR32ToD32(dst, src_view);
|
||||||
}
|
}
|
||||||
@ -2055,7 +2034,7 @@ void TextureCacheRuntime::TransitionImageLayout(Image& image) {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
scheduler.RequestOutsideRenderPassOperationContext();
|
scheduler.RequestOutsideRenderPassOperationContext();
|
||||||
scheduler.Record([barrier](vk::CommandBuffer cmdbuf) {
|
scheduler.Record([barrier = barrier](vk::CommandBuffer cmdbuf) {
|
||||||
cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, barrier);
|
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, barrier);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user