Compare commits
5 Commits
android-16
...
android-16
Author | SHA1 | Date | |
---|---|---|---|
93d90b5e87 | |||
c2ecdaabb5 | |||
39fe6e4516 | |||
f2e9fcb6a2 | |||
5888f2c3cb |
@ -305,7 +305,7 @@ find_package(ZLIB 1.2 REQUIRED)
|
||||
find_package(zstd 1.5 REQUIRED)
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_HEADERS)
|
||||
find_package(Vulkan 1.3.274 REQUIRED)
|
||||
find_package(Vulkan 1.3.256 REQUIRED)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LIBUSB)
|
||||
|
@ -1,7 +1,9 @@
|
||||
| Pull Request | Commit | Title | Author | Merged? |
|
||||
|----|----|----|----|----|
|
||||
| [12407](https://github.com/yuzu-emu/yuzu//pull/12407) | [`6e2cbd474`](https://github.com/yuzu-emu/yuzu//pull/12407/files) | shader_recompiler: patch small float image writes on broken drivers | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [12410](https://github.com/yuzu-emu/yuzu//pull/12410) | [`d0a75580d`](https://github.com/yuzu-emu/yuzu//pull/12410/files) | renderer_vulkan: don't pass null view when nullDescriptor is not supported | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [12390](https://github.com/yuzu-emu/yuzu//pull/12390) | [`fba3fa705`](https://github.com/yuzu-emu/yuzu//pull/12390/files) | renderer_vulkan: work around turnip binding bug in a610 | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [12400](https://github.com/yuzu-emu/yuzu//pull/12400) | [`a2b567dfd`](https://github.com/yuzu-emu/yuzu//pull/12400/files) | vk_query_cache: Fix prefix sum max_accumulation_limit logic | [ameerj](https://github.com/ameerj/) | Yes |
|
||||
| [12403](https://github.com/yuzu-emu/yuzu//pull/12403) | [`fcfa8b680`](https://github.com/yuzu-emu/yuzu//pull/12403/files) | shader_recompiler: use minimal clip distance array | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [12409](https://github.com/yuzu-emu/yuzu//pull/12409) | [`93c19a40b`](https://github.com/yuzu-emu/yuzu//pull/12409/files) | nce: fix read size in simd immediate emulation | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
|
||||
|
||||
End of merge log. You can find the original README.md below the break.
|
||||
|
2
externals/Vulkan-Headers
vendored
2
externals/Vulkan-Headers
vendored
Submodule externals/Vulkan-Headers updated: 80207f9da8...df60f03168
@ -5,6 +5,8 @@
|
||||
#include "common/bit_cast.h"
|
||||
#include "core/arm/nce/interpreter_visitor.h"
|
||||
|
||||
#include <dynarmic/frontend/A64/decoder/a64.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
template <u32 BitSize>
|
||||
|
@ -4,15 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
|
||||
#include <dynarmic/frontend/A64/a64_types.h>
|
||||
#include <dynarmic/frontend/A64/decoder/a64.h>
|
||||
#include <dynarmic/frontend/imm.h>
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace Core {
|
||||
|
||||
class VisitorBase {
|
||||
|
@ -74,17 +74,9 @@ spv::ImageFormat GetImageFormat(ImageFormat format) {
|
||||
throw InvalidArgument("Invalid image format {}", format);
|
||||
}
|
||||
|
||||
Id GetImageSampledType(EmitContext& ctx, const ImageDescriptor& desc) {
|
||||
if (desc.is_float) {
|
||||
return ctx.F32[1];
|
||||
} else {
|
||||
return ctx.U32[1];
|
||||
}
|
||||
}
|
||||
|
||||
Id ImageType(EmitContext& ctx, const ImageDescriptor& desc) {
|
||||
const spv::ImageFormat format{GetImageFormat(desc.format)};
|
||||
const Id type{GetImageSampledType(ctx, desc)};
|
||||
const Id type{ctx.U32[1]};
|
||||
switch (desc.type) {
|
||||
case TextureType::Color1D:
|
||||
return ctx.TypeImage(type, spv::Dim::Dim1D, false, false, false, 2, format);
|
||||
|
@ -512,7 +512,7 @@ OPCODE(ImageQueryDimensions, U32x4, Opaq
|
||||
OPCODE(ImageQueryLod, F32x4, Opaque, Opaque, )
|
||||
OPCODE(ImageGradient, F32x4, Opaque, Opaque, Opaque, Opaque, Opaque, )
|
||||
OPCODE(ImageRead, U32x4, Opaque, Opaque, )
|
||||
OPCODE(ImageWrite, Void, Opaque, Opaque, Opaque, )
|
||||
OPCODE(ImageWrite, Void, Opaque, Opaque, U32x4, )
|
||||
|
||||
OPCODE(IsTextureScaled, U1, U32, )
|
||||
OPCODE(IsImageScaled, U1, U32, )
|
||||
|
@ -19,10 +19,8 @@ struct HostTranslateInfo {
|
||||
u32 min_ssbo_alignment{}; ///< Minimum alignment supported by the device for SSBOs
|
||||
bool support_geometry_shader_passthrough{}; ///< True when the device supports geometry
|
||||
///< passthrough shaders
|
||||
bool support_conditional_barrier{}; ///< True when the device supports barriers in conditional
|
||||
///< control flow
|
||||
bool support_ufloat_write_as_uint{}; ///< True when the device supports writing float images
|
||||
///< as bitcasts to uint
|
||||
bool support_conditional_barrier{}; ///< True when the device supports barriers in conditional
|
||||
///< control flow
|
||||
};
|
||||
|
||||
} // namespace Shader
|
||||
|
@ -372,10 +372,6 @@ TexturePixelFormat ReadTexturePixelFormat(Environment& env, const ConstBufferAdd
|
||||
return env.ReadTexturePixelFormat(GetTextureHandle(env, cbuf));
|
||||
}
|
||||
|
||||
bool TexturePixelFormatIsFloat(Environment& env, const ConstBufferAddr& cbuf) {
|
||||
return ReadTexturePixelFormat(env, cbuf) == TexturePixelFormat::B10G11R11_FLOAT;
|
||||
}
|
||||
|
||||
class Descriptors {
|
||||
public:
|
||||
explicit Descriptors(TextureBufferDescriptors& texture_buffer_descriptors_,
|
||||
@ -432,9 +428,8 @@ public:
|
||||
return desc.type == existing.type && desc.format == existing.format &&
|
||||
desc.cbuf_index == existing.cbuf_index &&
|
||||
desc.cbuf_offset == existing.cbuf_offset && desc.count == existing.count &&
|
||||
desc.size_shift == existing.size_shift && desc.is_float == existing.is_float;
|
||||
desc.size_shift == existing.size_shift;
|
||||
})};
|
||||
// TODO: handle is_float?
|
||||
image_descriptors[index].is_written |= desc.is_written;
|
||||
image_descriptors[index].is_read |= desc.is_read;
|
||||
return index;
|
||||
@ -505,19 +500,6 @@ void PatchTexelFetch(IR::Block& block, IR::Inst& inst, TexturePixelFormat pixel_
|
||||
ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::U32>(w)), max_value));
|
||||
inst.ReplaceUsesWith(converted);
|
||||
}
|
||||
|
||||
void PatchSmallFloatImageWrite(IR::Block& block, IR::Inst& inst) {
|
||||
IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)};
|
||||
|
||||
const IR::Value old_value{inst.Arg(2)};
|
||||
const IR::F32 x(ir.BitCast<IR::F32>(IR::U32(ir.CompositeExtract(old_value, 0))));
|
||||
const IR::F32 y(ir.BitCast<IR::F32>(IR::U32(ir.CompositeExtract(old_value, 1))));
|
||||
const IR::F32 z(ir.BitCast<IR::F32>(IR::U32(ir.CompositeExtract(old_value, 2))));
|
||||
const IR::F32 w(ir.BitCast<IR::F32>(IR::U32(ir.CompositeExtract(old_value, 3))));
|
||||
const IR::Value converted = ir.CompositeConstruct(x, y, z, w);
|
||||
inst.SetArg(2, converted);
|
||||
}
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo& host_info) {
|
||||
@ -549,9 +531,6 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
|
||||
inst->ReplaceOpcode(IndexedInstruction(*inst));
|
||||
|
||||
const auto& cbuf{texture_inst.cbuf};
|
||||
const bool is_float_write{!host_info.support_ufloat_write_as_uint &&
|
||||
inst->GetOpcode() == IR::Opcode::ImageWrite &&
|
||||
TexturePixelFormatIsFloat(env, cbuf)};
|
||||
auto flags{inst->Flags<IR::TextureInstInfo>()};
|
||||
bool is_multisample{false};
|
||||
switch (inst->GetOpcode()) {
|
||||
@ -624,7 +603,6 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
|
||||
.format = flags.image_format,
|
||||
.is_written = is_written,
|
||||
.is_read = is_read,
|
||||
.is_float = is_float_write,
|
||||
.cbuf_index = cbuf.index,
|
||||
.cbuf_offset = cbuf.offset,
|
||||
.count = cbuf.count,
|
||||
@ -684,10 +662,6 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
|
||||
PatchTexelFetch(*texture_inst.block, *texture_inst.inst, pixel_format);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_float_write) {
|
||||
PatchSmallFloatImageWrite(*texture_inst.block, *inst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,6 @@ enum class TexturePixelFormat : u32 {
|
||||
R16G16B16A16_SNORM,
|
||||
R16G16_SNORM,
|
||||
R16_SNORM,
|
||||
B10G11R11_FLOAT,
|
||||
OTHER
|
||||
};
|
||||
|
||||
@ -130,7 +129,6 @@ struct ImageDescriptor {
|
||||
ImageFormat format;
|
||||
bool is_written;
|
||||
bool is_read;
|
||||
bool is_float;
|
||||
u32 cbuf_index;
|
||||
u32 cbuf_offset;
|
||||
u32 count;
|
||||
|
@ -245,7 +245,6 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo
|
||||
.min_ssbo_alignment = static_cast<u32>(device.GetShaderStorageBufferAlignment()),
|
||||
.support_geometry_shader_passthrough = device.HasGeometryShaderPassthrough(),
|
||||
.support_conditional_barrier = device.SupportsConditionalBarriers(),
|
||||
.support_ufloat_write_as_uint = true,
|
||||
} {
|
||||
if (use_asynchronous_shaders) {
|
||||
workers = CreateWorkers();
|
||||
|
@ -78,15 +78,8 @@ vk::Buffer CreateBuffer(const Device& device, const MemoryAllocator& memory_allo
|
||||
}
|
||||
} // Anonymous namespace
|
||||
|
||||
Buffer::Buffer(BufferCacheRuntime& runtime, VideoCommon::NullBufferParams null_params)
|
||||
: VideoCommon::BufferBase<VideoCore::RasterizerInterface>(null_params), tracker{4096} {
|
||||
if (runtime.device.HasNullDescriptor()) {
|
||||
return;
|
||||
}
|
||||
device = &runtime.device;
|
||||
buffer = runtime.CreateNullBuffer();
|
||||
is_null = true;
|
||||
}
|
||||
Buffer::Buffer(BufferCacheRuntime&, VideoCommon::NullBufferParams null_params)
|
||||
: VideoCommon::BufferBase<VideoCore::RasterizerInterface>(null_params), tracker{4096} {}
|
||||
|
||||
Buffer::Buffer(BufferCacheRuntime& runtime, VideoCore::RasterizerInterface& rasterizer_,
|
||||
VAddr cpu_addr_, u64 size_bytes_)
|
||||
@ -100,12 +93,8 @@ Buffer::Buffer(BufferCacheRuntime& runtime, VideoCore::RasterizerInterface& rast
|
||||
|
||||
VkBufferView Buffer::View(u32 offset, u32 size, VideoCore::Surface::PixelFormat format) {
|
||||
if (!device) {
|
||||
// Null buffer supported, return a null descriptor
|
||||
// Null buffer, return a null descriptor
|
||||
return VK_NULL_HANDLE;
|
||||
} else if (is_null) {
|
||||
// Null buffer not supported, adjust offset and size
|
||||
offset = 0;
|
||||
size = 0;
|
||||
}
|
||||
const auto it{std::ranges::find_if(views, [offset, size, format](const BufferView& view) {
|
||||
return offset == view.offset && size == view.size && format == view.format;
|
||||
@ -638,12 +627,9 @@ void BufferCacheRuntime::BindTransformFeedbackBuffers(VideoCommon::HostBindings<
|
||||
}
|
||||
|
||||
void BufferCacheRuntime::ReserveNullBuffer() {
|
||||
if (!null_buffer) {
|
||||
null_buffer = CreateNullBuffer();
|
||||
if (null_buffer) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
vk::Buffer BufferCacheRuntime::CreateNullBuffer() {
|
||||
VkBufferCreateInfo create_info{
|
||||
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
@ -658,17 +644,15 @@ vk::Buffer BufferCacheRuntime::CreateNullBuffer() {
|
||||
if (device.IsExtTransformFeedbackSupported()) {
|
||||
create_info.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT;
|
||||
}
|
||||
vk::Buffer ret = memory_allocator.CreateBuffer(create_info, MemoryUsage::DeviceLocal);
|
||||
null_buffer = memory_allocator.CreateBuffer(create_info, MemoryUsage::DeviceLocal);
|
||||
if (device.HasDebuggingToolAttached()) {
|
||||
ret.SetObjectNameEXT("Null buffer");
|
||||
null_buffer.SetObjectNameEXT("Null buffer");
|
||||
}
|
||||
|
||||
scheduler.RequestOutsideRenderPassOperationContext();
|
||||
scheduler.Record([buffer = *ret](vk::CommandBuffer cmdbuf) {
|
||||
scheduler.Record([buffer = *null_buffer](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.FillBuffer(buffer, 0, VK_WHOLE_SIZE, 0);
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace Vulkan
|
||||
|
@ -63,7 +63,6 @@ private:
|
||||
vk::Buffer buffer;
|
||||
std::vector<BufferView> views;
|
||||
VideoCommon::UsageTracker tracker;
|
||||
bool is_null{};
|
||||
};
|
||||
|
||||
class QuadArrayIndexBuffer;
|
||||
@ -152,7 +151,6 @@ private:
|
||||
}
|
||||
|
||||
void ReserveNullBuffer();
|
||||
vk::Buffer CreateNullBuffer();
|
||||
|
||||
const Device& device;
|
||||
MemoryAllocator& memory_allocator;
|
||||
|
@ -388,9 +388,6 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device
|
||||
.min_ssbo_alignment = static_cast<u32>(device.GetStorageBufferAlignment()),
|
||||
.support_geometry_shader_passthrough = device.IsNvGeometryShaderPassthroughSupported(),
|
||||
.support_conditional_barrier = device.SupportsConditionalBarriers(),
|
||||
.support_ufloat_write_as_uint = driver_id != VK_DRIVER_ID_QUALCOMM_PROPRIETARY &&
|
||||
driver_id != VK_DRIVER_ID_MESA_TURNIP &&
|
||||
driver_id != VK_DRIVER_ID_ARM_PROPRIETARY,
|
||||
};
|
||||
|
||||
if (device.GetMaxVertexInputAttributes() < Maxwell::NumVertexAttributes) {
|
||||
|
@ -76,8 +76,6 @@ static Shader::TexturePixelFormat ConvertTexturePixelFormat(const Tegra::Texture
|
||||
return Shader::TexturePixelFormat::R16G16_SNORM;
|
||||
case VideoCore::Surface::PixelFormat::R16_SNORM:
|
||||
return Shader::TexturePixelFormat::R16_SNORM;
|
||||
case VideoCore::Surface::PixelFormat::B10G11R11_FLOAT:
|
||||
return Shader::TexturePixelFormat::B10G11R11_FLOAT;
|
||||
default:
|
||||
return Shader::TexturePixelFormat::OTHER;
|
||||
}
|
||||
|
@ -377,8 +377,6 @@ const char* ToString(VkResult result) noexcept {
|
||||
return "VK_OPERATION_DEFERRED_KHR";
|
||||
case VkResult::VK_OPERATION_NOT_DEFERRED_KHR:
|
||||
return "VK_OPERATION_NOT_DEFERRED_KHR";
|
||||
case VkResult::VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR:
|
||||
return "VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR";
|
||||
case VkResult::VK_PIPELINE_COMPILE_REQUIRED_EXT:
|
||||
return "VK_PIPELINE_COMPILE_REQUIRED_EXT";
|
||||
case VkResult::VK_RESULT_MAX_ENUM:
|
||||
|
Reference in New Issue
Block a user