Compare commits

..

5 Commits

Author SHA1 Message Date
lat9nq
74e7f07bef shader_recompiler: Implement LowerInt16ToInt32
AMD drivers 22.3.2 and later expose a bug in yuzu, where the application
would submit 16-bit integer instructions to GPUs that don't support
16-bit integers, namely GCN 4 devices.

Replace any 16-bit instructions with 32-bit ones so newer AMD drivers
will work with VK_KHR_workgroup_memory_explicit_layout.
2022-05-19 16:01:18 -04:00
Mai M
b57df1dcb9 Merge pull request #8351 from abouvier/patch-2
video_core: Support new VkResult
2022-05-17 14:10:00 -04:00
Alexandre Bouvier
020982508d video_core: Support new VkResult 2022-05-17 17:37:10 +02:00
Mai M
5808e76fae Merge pull request #8336 from abouvier/unspirv
sirit: Allow using system spirv-headers
2022-05-15 09:24:05 -04:00
Alexandre Bouvier
55b0dda57c sirit: Allow using system spirv-headers 2022-05-14 22:03:23 +02:00
11 changed files with 267 additions and 89 deletions

View File

@@ -999,47 +999,95 @@ void Controller_NPad::DisconnectNpad(Core::HID::NpadIdType npad_id) {
WriteEmptyEntry(shared_memory);
}
ResultCode Controller_NPad::SetGyroscopeZeroDriftMode(
const Core::HID::SixAxisSensorHandle& sixaxis_handle, GyroscopeZeroDriftMode drift_mode) {
ResultCode Controller_NPad::SetGyroscopeZeroDriftMode(Core::HID::SixAxisSensorHandle sixaxis_handle,
GyroscopeZeroDriftMode drift_mode) {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
return NpadInvalidHandle;
}
auto& sixaxis = GetSixaxisState(sixaxis_handle);
sixaxis.gyroscope_zero_drift_mode = drift_mode;
auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
controller.sixaxis_fullkey.gyroscope_zero_drift_mode = drift_mode;
break;
case Core::HID::NpadStyleIndex::Handheld:
controller.sixaxis_handheld.gyroscope_zero_drift_mode = drift_mode;
break;
case Core::HID::NpadStyleIndex::JoyconDual:
case Core::HID::NpadStyleIndex::GameCube:
case Core::HID::NpadStyleIndex::Pokeball:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
controller.sixaxis_dual_left.gyroscope_zero_drift_mode = drift_mode;
break;
}
controller.sixaxis_dual_right.gyroscope_zero_drift_mode = drift_mode;
break;
case Core::HID::NpadStyleIndex::JoyconLeft:
controller.sixaxis_left.gyroscope_zero_drift_mode = drift_mode;
break;
case Core::HID::NpadStyleIndex::JoyconRight:
controller.sixaxis_right.gyroscope_zero_drift_mode = drift_mode;
break;
default:
LOG_ERROR(Service_HID, "Invalid Npad type {}", sixaxis_handle.npad_type);
return NpadInvalidHandle;
}
return ResultSuccess;
}
ResultCode Controller_NPad::GetGyroscopeZeroDriftMode(
const Core::HID::SixAxisSensorHandle& sixaxis_handle,
GyroscopeZeroDriftMode& drift_mode) const {
ResultCode Controller_NPad::GetGyroscopeZeroDriftMode(Core::HID::SixAxisSensorHandle sixaxis_handle,
GyroscopeZeroDriftMode& drift_mode) const {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
return NpadInvalidHandle;
}
const auto& sixaxis = GetSixaxisState(sixaxis_handle);
drift_mode = sixaxis.gyroscope_zero_drift_mode;
auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
drift_mode = controller.sixaxis_fullkey.gyroscope_zero_drift_mode;
break;
case Core::HID::NpadStyleIndex::Handheld:
drift_mode = controller.sixaxis_handheld.gyroscope_zero_drift_mode;
break;
case Core::HID::NpadStyleIndex::JoyconDual:
case Core::HID::NpadStyleIndex::GameCube:
case Core::HID::NpadStyleIndex::Pokeball:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
drift_mode = controller.sixaxis_dual_left.gyroscope_zero_drift_mode;
break;
}
drift_mode = controller.sixaxis_dual_right.gyroscope_zero_drift_mode;
break;
case Core::HID::NpadStyleIndex::JoyconLeft:
drift_mode = controller.sixaxis_left.gyroscope_zero_drift_mode;
break;
case Core::HID::NpadStyleIndex::JoyconRight:
drift_mode = controller.sixaxis_right.gyroscope_zero_drift_mode;
break;
default:
LOG_ERROR(Service_HID, "Invalid Npad type {}", sixaxis_handle.npad_type);
return NpadInvalidHandle;
}
return ResultSuccess;
}
ResultCode Controller_NPad::IsSixAxisSensorAtRest(
const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_at_rest) const {
ResultCode Controller_NPad::IsSixAxisSensorAtRest(Core::HID::SixAxisSensorHandle sixaxis_handle,
bool& is_at_rest) const {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
return NpadInvalidHandle;
}
const auto& controller = GetControllerFromHandle(sixaxis_handle);
is_at_rest = controller.sixaxis_at_rest;
return ResultSuccess;
}
ResultCode Controller_NPad::IsFirmwareUpdateAvailableForSixAxisSensor(
const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_firmware_available) const {
Core::HID::SixAxisSensorHandle sixaxis_handle, bool& is_firmware_available) const {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
return NpadInvalidHandle;
@@ -1050,7 +1098,7 @@ ResultCode Controller_NPad::IsFirmwareUpdateAvailableForSixAxisSensor(
return ResultSuccess;
}
ResultCode Controller_NPad::SetSixAxisEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle,
ResultCode Controller_NPad::SetSixAxisEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle,
bool sixaxis_status) {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
@@ -1062,32 +1110,82 @@ ResultCode Controller_NPad::SetSixAxisEnabled(const Core::HID::SixAxisSensorHand
}
ResultCode Controller_NPad::IsSixAxisSensorFusionEnabled(
const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_fusion_enabled) const {
Core::HID::SixAxisSensorHandle sixaxis_handle, bool& is_fusion_enabled) const {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
return NpadInvalidHandle;
}
const auto& sixaxis = GetSixaxisState(sixaxis_handle);
is_fusion_enabled = sixaxis.is_fusion_enabled;
auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
is_fusion_enabled = controller.sixaxis_fullkey.is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::Handheld:
is_fusion_enabled = controller.sixaxis_handheld.is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::JoyconDual:
case Core::HID::NpadStyleIndex::GameCube:
case Core::HID::NpadStyleIndex::Pokeball:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
is_fusion_enabled = controller.sixaxis_dual_left.is_fusion_enabled;
break;
}
is_fusion_enabled = controller.sixaxis_dual_right.is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::JoyconLeft:
is_fusion_enabled = controller.sixaxis_left.is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::JoyconRight:
is_fusion_enabled = controller.sixaxis_right.is_fusion_enabled;
break;
default:
LOG_ERROR(Service_HID, "Invalid Npad type {}", sixaxis_handle.npad_type);
return NpadInvalidHandle;
}
return ResultSuccess;
}
ResultCode Controller_NPad::SetSixAxisFusionEnabled(
const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool is_fusion_enabled) {
ResultCode Controller_NPad::SetSixAxisFusionEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle,
bool is_fusion_enabled) {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
return NpadInvalidHandle;
}
auto& sixaxis = GetSixaxisState(sixaxis_handle);
sixaxis.is_fusion_enabled = is_fusion_enabled;
auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
controller.sixaxis_fullkey.is_fusion_enabled = is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::Handheld:
controller.sixaxis_handheld.is_fusion_enabled = is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::JoyconDual:
case Core::HID::NpadStyleIndex::GameCube:
case Core::HID::NpadStyleIndex::Pokeball:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
controller.sixaxis_dual_left.is_fusion_enabled = is_fusion_enabled;
break;
}
controller.sixaxis_dual_right.is_fusion_enabled = is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::JoyconLeft:
controller.sixaxis_left.is_fusion_enabled = is_fusion_enabled;
break;
case Core::HID::NpadStyleIndex::JoyconRight:
controller.sixaxis_right.is_fusion_enabled = is_fusion_enabled;
break;
default:
LOG_ERROR(Service_HID, "Invalid Npad type {}", sixaxis_handle.npad_type);
return NpadInvalidHandle;
}
return ResultSuccess;
}
ResultCode Controller_NPad::SetSixAxisFusionParameters(
const Core::HID::SixAxisSensorHandle& sixaxis_handle,
Core::HID::SixAxisSensorHandle sixaxis_handle,
Core::HID::SixAxisSensorFusionParameters sixaxis_fusion_parameters) {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
@@ -1098,22 +1196,72 @@ ResultCode Controller_NPad::SetSixAxisFusionParameters(
return InvalidSixAxisFusionRange;
}
auto& sixaxis = GetSixaxisState(sixaxis_handle);
sixaxis.fusion = sixaxis_fusion_parameters;
auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
controller.sixaxis_fullkey.fusion = sixaxis_fusion_parameters;
break;
case Core::HID::NpadStyleIndex::Handheld:
controller.sixaxis_handheld.fusion = sixaxis_fusion_parameters;
break;
case Core::HID::NpadStyleIndex::JoyconDual:
case Core::HID::NpadStyleIndex::GameCube:
case Core::HID::NpadStyleIndex::Pokeball:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
controller.sixaxis_dual_left.fusion = sixaxis_fusion_parameters;
break;
}
controller.sixaxis_dual_right.fusion = sixaxis_fusion_parameters;
break;
case Core::HID::NpadStyleIndex::JoyconLeft:
controller.sixaxis_left.fusion = sixaxis_fusion_parameters;
break;
case Core::HID::NpadStyleIndex::JoyconRight:
controller.sixaxis_right.fusion = sixaxis_fusion_parameters;
break;
default:
LOG_ERROR(Service_HID, "Invalid Npad type {}", sixaxis_handle.npad_type);
return NpadInvalidHandle;
}
return ResultSuccess;
}
ResultCode Controller_NPad::GetSixAxisFusionParameters(
const Core::HID::SixAxisSensorHandle& sixaxis_handle,
Core::HID::SixAxisSensorHandle sixaxis_handle,
Core::HID::SixAxisSensorFusionParameters& parameters) const {
if (!IsDeviceHandleValid(sixaxis_handle)) {
LOG_ERROR(Service_HID, "Invalid handle");
return NpadInvalidHandle;
}
const auto& sixaxis = GetSixaxisState(sixaxis_handle);
parameters = sixaxis.fusion;
const auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
parameters = controller.sixaxis_fullkey.fusion;
break;
case Core::HID::NpadStyleIndex::Handheld:
parameters = controller.sixaxis_handheld.fusion;
break;
case Core::HID::NpadStyleIndex::JoyconDual:
case Core::HID::NpadStyleIndex::GameCube:
case Core::HID::NpadStyleIndex::Pokeball:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
parameters = controller.sixaxis_dual_left.fusion;
break;
}
parameters = controller.sixaxis_dual_right.fusion;
break;
case Core::HID::NpadStyleIndex::JoyconLeft:
parameters = controller.sixaxis_left.fusion;
break;
case Core::HID::NpadStyleIndex::JoyconRight:
parameters = controller.sixaxis_right.fusion;
break;
default:
LOG_ERROR(Service_HID, "Invalid Npad type {}", sixaxis_handle.npad_type);
return NpadInvalidHandle;
}
return ResultSuccess;
}
@@ -1398,50 +1546,4 @@ const Controller_NPad::NpadControllerData& Controller_NPad::GetControllerFromNpa
return controller_data[npad_index];
}
Controller_NPad::SixaxisParameters& Controller_NPad::GetSixaxisState(
const Core::HID::SixAxisSensorHandle& sixaxis_handle) {
auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
case Core::HID::NpadStyleIndex::Pokeball:
return controller.sixaxis_fullkey;
case Core::HID::NpadStyleIndex::Handheld:
return controller.sixaxis_handheld;
case Core::HID::NpadStyleIndex::JoyconDual:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
return controller.sixaxis_dual_left;
}
return controller.sixaxis_dual_right;
case Core::HID::NpadStyleIndex::JoyconLeft:
return controller.sixaxis_left;
case Core::HID::NpadStyleIndex::JoyconRight:
return controller.sixaxis_right;
default:
return controller.sixaxis_unknown;
}
}
const Controller_NPad::SixaxisParameters& Controller_NPad::GetSixaxisState(
const Core::HID::SixAxisSensorHandle& sixaxis_handle) const {
const auto& controller = GetControllerFromHandle(sixaxis_handle);
switch (sixaxis_handle.npad_type) {
case Core::HID::NpadStyleIndex::ProController:
case Core::HID::NpadStyleIndex::Pokeball:
return controller.sixaxis_fullkey;
case Core::HID::NpadStyleIndex::Handheld:
return controller.sixaxis_handheld;
case Core::HID::NpadStyleIndex::JoyconDual:
if (sixaxis_handle.device_index == Core::HID::DeviceIndex::Left) {
return controller.sixaxis_dual_left;
}
return controller.sixaxis_dual_right;
case Core::HID::NpadStyleIndex::JoyconLeft:
return controller.sixaxis_left;
case Core::HID::NpadStyleIndex::JoyconRight:
return controller.sixaxis_right;
default:
return controller.sixaxis_unknown;
}
}
} // namespace Service::HID

View File

@@ -143,25 +143,25 @@ public:
void DisconnectNpad(Core::HID::NpadIdType npad_id);
ResultCode SetGyroscopeZeroDriftMode(const Core::HID::SixAxisSensorHandle& sixaxis_handle,
ResultCode SetGyroscopeZeroDriftMode(Core::HID::SixAxisSensorHandle sixaxis_handle,
GyroscopeZeroDriftMode drift_mode);
ResultCode GetGyroscopeZeroDriftMode(const Core::HID::SixAxisSensorHandle& sixaxis_handle,
ResultCode GetGyroscopeZeroDriftMode(Core::HID::SixAxisSensorHandle sixaxis_handle,
GyroscopeZeroDriftMode& drift_mode) const;
ResultCode IsSixAxisSensorAtRest(const Core::HID::SixAxisSensorHandle& sixaxis_handle,
ResultCode IsSixAxisSensorAtRest(Core::HID::SixAxisSensorHandle sixaxis_handle,
bool& is_at_rest) const;
ResultCode IsFirmwareUpdateAvailableForSixAxisSensor(
const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_firmware_available) const;
ResultCode SetSixAxisEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle,
Core::HID::SixAxisSensorHandle sixaxis_handle, bool& is_firmware_available) const;
ResultCode SetSixAxisEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle,
bool sixaxis_status);
ResultCode IsSixAxisSensorFusionEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle,
ResultCode IsSixAxisSensorFusionEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle,
bool& is_fusion_enabled) const;
ResultCode SetSixAxisFusionEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle,
ResultCode SetSixAxisFusionEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle,
bool is_fusion_enabled);
ResultCode SetSixAxisFusionParameters(
const Core::HID::SixAxisSensorHandle& sixaxis_handle,
Core::HID::SixAxisSensorHandle sixaxis_handle,
Core::HID::SixAxisSensorFusionParameters sixaxis_fusion_parameters);
ResultCode GetSixAxisFusionParameters(
const Core::HID::SixAxisSensorHandle& sixaxis_handle,
Core::HID::SixAxisSensorHandle sixaxis_handle,
Core::HID::SixAxisSensorFusionParameters& parameters) const;
Core::HID::LedPattern GetLedPattern(Core::HID::NpadIdType npad_id);
bool IsUnintendedHomeButtonInputProtectionEnabled(Core::HID::NpadIdType npad_id) const;
@@ -491,7 +491,6 @@ private:
SixaxisParameters sixaxis_dual_right{};
SixaxisParameters sixaxis_left{};
SixaxisParameters sixaxis_right{};
SixaxisParameters sixaxis_unknown{};
// Current pad state
NPadGenericState npad_pad_state{};
@@ -523,10 +522,6 @@ private:
NpadControllerData& GetControllerFromNpadIdType(Core::HID::NpadIdType npad_id);
const NpadControllerData& GetControllerFromNpadIdType(Core::HID::NpadIdType npad_id) const;
SixaxisParameters& GetSixaxisState(const Core::HID::SixAxisSensorHandle& device_handle);
const SixaxisParameters& GetSixaxisState(
const Core::HID::SixAxisSensorHandle& device_handle) const;
std::atomic<u64> press_state{};
std::array<NpadControllerData, NPAD_COUNT> controller_data{};

View File

@@ -219,6 +219,7 @@ add_library(shader_recompiler STATIC
ir_opt/global_memory_to_storage_buffer_pass.cpp
ir_opt/identity_removal_pass.cpp
ir_opt/lower_fp16_to_fp32.cpp
ir_opt/lower_int16_to_int32.cpp
ir_opt/lower_int64_to_int32.cpp
ir_opt/passes.h
ir_opt/rescaling_pass.cpp

View File

@@ -209,6 +209,9 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo
if (!host_info.support_int64) {
Optimization::LowerInt64ToInt32(program);
}
if (!host_info.support_int16) {
Optimization::LowerInt16ToInt32(program);
}
Optimization::SsaRewritePass(program);
Optimization::ConstantPropagationPass(program);

View File

@@ -11,6 +11,7 @@ namespace Shader {
/// Misc information about the host
struct HostTranslateInfo {
bool support_float16{}; ///< True when the device supports 16-bit floats
bool support_int16{}; ///< True when the device supports 16-bit integers
bool support_int64{}; ///< True when the device supports 64-bit integers
bool needs_demote_reorder{}; ///< True when the device needs DemoteToHelperInvocation reordered
};

View File

@@ -0,0 +1,72 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "shader_recompiler/frontend/ir/value.h"
#include "shader_recompiler/ir_opt/passes.h"
namespace Shader::Optimization {
namespace {
IR::Opcode Replace(IR::Opcode op) {
switch (op) {
case IR::Opcode::GetCbufU16:
case IR::Opcode::GetCbufS16:
return IR::Opcode::GetCbufU32;
case IR::Opcode::UndefU16:
return IR::Opcode::UndefU32;
case IR::Opcode::LoadGlobalU16:
case IR::Opcode::LoadGlobalS16:
return IR::Opcode::LoadGlobal32;
case IR::Opcode::WriteGlobalU16:
case IR::Opcode::WriteGlobalS16:
return IR::Opcode::WriteGlobal32;
case IR::Opcode::LoadStorageU16:
case IR::Opcode::LoadStorageS16:
return IR::Opcode::LoadStorage32;
case IR::Opcode::WriteStorageU16:
case IR::Opcode::WriteStorageS16:
return IR::Opcode::WriteStorage32;
case IR::Opcode::LoadSharedU16:
case IR::Opcode::LoadSharedS16:
return IR::Opcode::LoadSharedU32;
case IR::Opcode::WriteSharedU16:
return IR::Opcode::WriteSharedU32;
case IR::Opcode::SelectU16:
return IR::Opcode::SelectU32;
case IR::Opcode::BitCastU16F16:
return IR::Opcode::BitCastU32F32;
case IR::Opcode::BitCastF16U16:
return IR::Opcode::BitCastF32U32;
case IR::Opcode::ConvertS16F16:
case IR::Opcode::ConvertS16F32:
return IR::Opcode::ConvertS32F32;
case IR::Opcode::ConvertS16F64:
return IR::Opcode::ConvertS32F64;
case IR::Opcode::ConvertU16F16:
case IR::Opcode::ConvertU16F32:
return IR::Opcode::ConvertU32F32;
case IR::Opcode::ConvertU16F64:
return IR::Opcode::ConvertU32F64;
case IR::Opcode::ConvertF16S16:
case IR::Opcode::ConvertF32S16:
return IR::Opcode::ConvertF32S32;
case IR::Opcode::ConvertF16U16:
case IR::Opcode::ConvertF32U16:
return IR::Opcode::ConvertF32U32;
case IR::Opcode::ConvertF64S16:
case IR::Opcode::ConvertF64U16:
return IR::Opcode::ConvertF64U32;
default:
return op;
}
}
} // Anonymous namespace
void LowerInt16ToInt32(IR::Program& program) {
for (IR::Block* const block : program.blocks) {
for (IR::Inst& inst : block->Instructions()) {
inst.ReplaceOpcode(Replace(inst.GetOpcode()));
}
}
}
} // namespace Shader::Optimization

View File

@@ -14,6 +14,7 @@ void DeadCodeEliminationPass(IR::Program& program);
void GlobalMemoryToStorageBufferPass(IR::Program& program);
void IdentityRemovalPass(IR::Program& program);
void LowerFp16ToFp32(IR::Program& program);
void LowerInt16ToInt32(IR::Program& program);
void LowerInt64ToInt32(IR::Program& program);
void RescalingPass(IR::Program& program);
void SsaRewritePass(IR::Program& program);

View File

@@ -322,6 +322,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, Tegra::Engines::Maxw
};
host_info = Shader::HostTranslateInfo{
.support_float16 = device.IsFloat16Supported(),
.support_int16 = device.IsShaderInt16Supported(),
.support_int64 = device.IsShaderInt64Supported(),
.needs_demote_reorder = driver_id == VK_DRIVER_ID_AMD_PROPRIETARY_KHR ||
driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR,

View File

@@ -325,6 +325,8 @@ const char* ToString(VkResult result) noexcept {
return "VK_PIPELINE_COMPILE_REQUIRED_EXT";
case VkResult::VK_RESULT_MAX_ENUM:
return "VK_RESULT_MAX_ENUM";
case VkResult::VK_ERROR_COMPRESSION_EXHAUSTED_EXT:
return "VK_ERROR_COMPRESSION_EXHAUSTED_EXT";
}
return "Unknown";
}