[GPU] shader-compiler: Accept little-endian ucode

This commit is contained in:
Triang3l
2022-04-26 22:59:02 +03:00
parent 443d61c9e1
commit 69958cba9d
9 changed files with 48 additions and 19 deletions

View File

@@ -22,9 +22,12 @@ namespace xe {
namespace gpu {
namespace d3d12 {
D3D12Shader::D3D12Shader(xenos::ShaderType shader_type, uint64_t data_hash,
const uint32_t* dword_ptr, uint32_t dword_count)
: DxbcShader(shader_type, data_hash, dword_ptr, dword_count) {}
D3D12Shader::D3D12Shader(xenos::ShaderType shader_type,
uint64_t ucode_data_hash, const uint32_t* ucode_dwords,
size_t ucode_dword_count,
std::endian ucode_source_endian)
: DxbcShader(shader_type, ucode_data_hash, ucode_dwords, ucode_dword_count,
ucode_source_endian) {}
void D3D12Shader::D3D12Translation::DisassembleDxbcAndDxil(
const ui::d3d12::D3D12Provider& provider, bool disassemble_dxbc,

View File

@@ -33,8 +33,9 @@ class D3D12Shader : public DxbcShader {
IDxcCompiler* dxc_compiler = nullptr);
};
D3D12Shader(xenos::ShaderType shader_type, uint64_t data_hash,
const uint32_t* dword_ptr, uint32_t dword_count);
D3D12Shader(xenos::ShaderType shader_type, uint64_t ucode_data_hash,
const uint32_t* ucode_dwords, size_t ucode_dword_count,
std::endian ucode_source_endian = std::endian::big);
// For owning subsystem like the pipeline cache, accessors for unique
// identifiers (used instead of hashes to make sure collisions can't happen)