mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 16:25:36 +03:00
Update to latest hades
This commit is contained in:
parent
44f6aada18
commit
0a608fb4b2
@ -1 +1 @@
|
|||||||
Subproject commit 58ae23f7dbd87eaf40f90ba90e4d8aa2c29d363c
|
Subproject commit ffcaed48cd067a4e720740c09578641d29043c0d
|
@ -8,7 +8,7 @@
|
|||||||
namespace skyline::gpu {
|
namespace skyline::gpu {
|
||||||
struct PipelineCacheFileHeader {
|
struct PipelineCacheFileHeader {
|
||||||
static constexpr u32 Magic{util::MakeMagic<u32>("PCHE")}; //!< The magic value used to identify a pipeline cache file
|
static constexpr u32 Magic{util::MakeMagic<u32>("PCHE")}; //!< The magic value used to identify a pipeline cache file
|
||||||
static constexpr u32 Version{1}; //!< The version of the pipeline cache file format, MUST be incremented for any format changes
|
static constexpr u32 Version{2}; //!< The version of the pipeline cache file format, MUST be incremented for any format changes
|
||||||
|
|
||||||
u32 magic{Magic};
|
u32 magic{Magic};
|
||||||
u32 version{Version};
|
u32 version{Version};
|
||||||
|
@ -83,7 +83,7 @@ namespace skyline::gpu {
|
|||||||
.support_snorm_render_buffer = true,
|
.support_snorm_render_buffer = true,
|
||||||
.support_viewport_index_layer = gpu.traits.supportsShaderViewportIndexLayer,
|
.support_viewport_index_layer = gpu.traits.supportsShaderViewportIndexLayer,
|
||||||
.min_ssbo_alignment = traits.minimumStorageBufferAlignment,
|
.min_ssbo_alignment = traits.minimumStorageBufferAlignment,
|
||||||
.support_geometry_passthrough = false
|
.support_geometry_shader_passthrough = false
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr u32 TegraX1WarpSize{32}; //!< The amount of threads in a warp on the Tegra X1
|
constexpr u32 TegraX1WarpSize{32}; //!< The amount of threads in a warp on the Tegra X1
|
||||||
@ -121,6 +121,7 @@ namespace skyline::gpu {
|
|||||||
.has_broken_spirv_position_input = traits.quirks.brokenSpirvPositionInput,
|
.has_broken_spirv_position_input = traits.quirks.brokenSpirvPositionInput,
|
||||||
.has_broken_spirv_subgroup_mask_vector_extract_dynamic = traits.quirks.brokenSubgroupMaskExtractDynamic,
|
.has_broken_spirv_subgroup_mask_vector_extract_dynamic = traits.quirks.brokenSubgroupMaskExtractDynamic,
|
||||||
.has_broken_spirv_subgroup_shuffle = traits.quirks.brokenSubgroupShuffle,
|
.has_broken_spirv_subgroup_shuffle = traits.quirks.brokenSubgroupShuffle,
|
||||||
|
.max_subgroup_size = traits.subgroupSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
Shader::Settings::values = {
|
Shader::Settings::values = {
|
||||||
@ -164,6 +165,7 @@ namespace skyline::gpu {
|
|||||||
stage = pStage;
|
stage = pStage;
|
||||||
sph = *reinterpret_cast<Shader::ProgramHeader *>(binary.data());
|
sph = *reinterpret_cast<Shader::ProgramHeader *>(binary.data());
|
||||||
start_address = baseOffset;
|
start_address = baseOffset;
|
||||||
|
is_propietary_driver = textureBufferIndex == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] u64 ReadInstruction(u32 address) final {
|
[[nodiscard]] u64 ReadInstruction(u32 address) final {
|
||||||
@ -205,6 +207,14 @@ namespace skyline::gpu {
|
|||||||
return {0, 0, 0}; // Only relevant for compute shaders
|
return {0, 0, 0}; // Only relevant for compute shaders
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] bool HasHLEMacroState() const final {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] std::optional<Shader::ReplaceConstant> GetReplaceConstBuffer(u32 bank, u32 offset) final {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
void Dump(u64 hash) final {}
|
void Dump(u64 hash) final {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -239,6 +249,7 @@ namespace skyline::gpu {
|
|||||||
getTextureType{std::move(getTextureType)} {
|
getTextureType{std::move(getTextureType)} {
|
||||||
stage = Shader::Stage::Compute;
|
stage = Shader::Stage::Compute;
|
||||||
start_address = baseOffset;
|
start_address = baseOffset;
|
||||||
|
is_propietary_driver = textureBufferIndex == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] u64 ReadInstruction(u32 address) final {
|
[[nodiscard]] u64 ReadInstruction(u32 address) final {
|
||||||
@ -280,6 +291,14 @@ namespace skyline::gpu {
|
|||||||
return workgroupDimensions;
|
return workgroupDimensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] bool HasHLEMacroState() const final {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] std::optional<Shader::ReplaceConstant> GetReplaceConstBuffer(u32 bank, u32 offset) final {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
void Dump(u64 hash) final {}
|
void Dump(u64 hash) final {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -383,13 +402,13 @@ namespace skyline::gpu {
|
|||||||
return Shader::Maxwell::TranslateProgram(instructionPool, blockPool, environment, cfg, hostTranslateInfo);
|
return Shader::Maxwell::TranslateProgram(instructionPool, blockPool, environment, cfg, hostTranslateInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
vk::ShaderModule ShaderManager::CompileShader(const Shader::RuntimeInfo &runtimeInfo, Shader::IR::Program &program, Shader::Backend::Bindings &bindings) {
|
vk::ShaderModule ShaderManager::CompileShader(const Shader::RuntimeInfo &runtimeInfo, Shader::IR::Program &program, Shader::Backend::Bindings &bindings, u64 hash) {
|
||||||
std::scoped_lock lock{poolMutex};
|
std::scoped_lock lock{poolMutex};
|
||||||
|
|
||||||
if (program.info.loads.Legacy() || program.info.stores.Legacy())
|
if (program.info.loads.Legacy() || program.info.stores.Legacy())
|
||||||
Shader::Maxwell::ConvertLegacyToGeneric(program, runtimeInfo);
|
Shader::Maxwell::ConvertLegacyToGeneric(program, runtimeInfo);
|
||||||
|
|
||||||
auto spirv{Shader::Backend::SPIRV::EmitSPIRV(profile, runtimeInfo, program, bindings)};
|
auto spirv{Shader::Backend::SPIRV::EmitSPIRV(profile, runtimeInfo, program, bindings, fmt::format("shader_{:016X}", hash))};
|
||||||
|
|
||||||
vk::ShaderModuleCreateInfo createInfo{
|
vk::ShaderModuleCreateInfo createInfo{
|
||||||
.pCode = spirv.data(),
|
.pCode = spirv.data(),
|
||||||
|
@ -68,7 +68,7 @@ namespace skyline::gpu {
|
|||||||
|
|
||||||
Shader::IR::Program ParseComputeShader(u64 hash, span<u8> binary, u32 baseOffset, u32 textureConstantBufferIndex, u32 localMemorySize, u32 sharedMemorySize, std::array<u32, 3> workgroupDimensions, const ConstantBufferRead &constantBufferRead, const GetTextureType &getTextureType);
|
Shader::IR::Program ParseComputeShader(u64 hash, span<u8> binary, u32 baseOffset, u32 textureConstantBufferIndex, u32 localMemorySize, u32 sharedMemorySize, std::array<u32, 3> workgroupDimensions, const ConstantBufferRead &constantBufferRead, const GetTextureType &getTextureType);
|
||||||
|
|
||||||
vk::ShaderModule CompileShader(const Shader::RuntimeInfo &runtimeInfo, Shader::IR::Program &program, Shader::Backend::Bindings &bindings);
|
vk::ShaderModule CompileShader(const Shader::RuntimeInfo &runtimeInfo, Shader::IR::Program &program, Shader::Backend::Bindings &bindings, u64 hash = 0);
|
||||||
|
|
||||||
void ResetPools();
|
void ResetPools();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user