From fabcdbc3aeb8ba9bf224577655da070d009985ff Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 15 Aug 2018 19:40:15 +0200 Subject: [PATCH] [dxbc] Add definitions for extended double instructions --- meson.build | 2 +- src/dxbc/dxbc_defs.cpp | 48 +++++++++++++++++++++++++++++++++++++++++- src/dxbc/dxbc_enums.h | 11 ++++++++++ tests/dxbc/meson.build | 2 +- 4 files changed, 60 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 6a0043e2..ef359bbe 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ else lib_vulkan = dxvk_compiler.find_library('vulkan-1', dirs : dxvk_library_path) lib_d3d11 = dxvk_compiler.find_library('d3d11') lib_dxgi = dxvk_compiler.find_library('dxgi') - lib_d3dcompiler = dxvk_compiler.find_library('d3dcompiler_43', dirs : dxvk_library_path) + lib_d3dcompiler = dxvk_compiler.find_library('d3dcompiler_47', dirs : dxvk_library_path) exe_ext = '' dll_ext = '' def_spec_ext = '.def' diff --git a/src/dxbc/dxbc_defs.cpp b/src/dxbc/dxbc_defs.cpp index 12833021..390489d7 100644 --- a/src/dxbc/dxbc_defs.cpp +++ b/src/dxbc/dxbc_defs.cpp @@ -2,7 +2,7 @@ namespace dxvk { - const std::array g_instructionFormats = {{ + const std::array g_instructionFormats = {{ /* Add */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, @@ -1045,6 +1045,52 @@ namespace dxvk { { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, + /* Abort */ + { }, + /* DebugBreak */ + { }, + /* ReservedBegin11_1 */ + { }, + /* DDiv */ + { 3, DxbcInstClass::VectorAlu, { + { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + } }, + /* DFma */ + { 4, DxbcInstClass::VectorAlu, { + { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + } }, + /* DRcp */ + { 2, DxbcInstClass::VectorAlu, { + { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + } }, + /* Msad */ + { }, + /* DtoI */ + { 2, DxbcInstClass::ConvertFloat64, { + { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + } }, + /* DtoU */ + { 2, DxbcInstClass::ConvertFloat64, { + { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, + } }, + /* ItoD */ + { 2, DxbcInstClass::ConvertFloat64, { + { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, + } }, + /* UtoD */ + { 2, DxbcInstClass::ConvertFloat64, { + { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, + { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, + } }, }}; diff --git a/src/dxbc/dxbc_enums.h b/src/dxbc/dxbc_enums.h index 1d7866c9..27610e46 100644 --- a/src/dxbc/dxbc_enums.h +++ b/src/dxbc/dxbc_enums.h @@ -215,6 +215,17 @@ namespace dxvk { EvalSampleIndex = 204, EvalCentroid = 205, DclGsInstanceCount = 206, + Abort = 207, + DebugBreak = 208, + ReservedBegin11_1 = 209, + DDiv = 210, + DFma = 211, + DRcp = 212, + Msad = 213, + DtoI = 214, + DtoU = 215, + ItoD = 216, + UtoD = 217, }; diff --git a/tests/dxbc/meson.build b/tests/dxbc/meson.build index 35638b2f..86d667d8 100644 --- a/tests/dxbc/meson.build +++ b/tests/dxbc/meson.build @@ -1,6 +1,6 @@ test_dxbc_deps = [ dxbc_dep, dxvk_dep ] executable('dxbc-compiler'+exe_ext, files('test_dxbc_compiler.cpp'), dependencies : test_dxbc_deps, install : true, override_options: ['cpp_std='+dxvk_cpp_std]) -executable('dxbc-disasm'+exe_ext, files('test_dxbc_disasm.cpp'), dependencies : [ test_dxbc_deps, lib_d3dcompiler ], install : true, override_options: ['cpp_std='+dxvk_cpp_std]) +#executable('dxbc-disasm'+exe_ext, files('test_dxbc_disasm.cpp'), dependencies : [ test_dxbc_deps, lib_d3dcompiler ], install : true, override_options: ['cpp_std='+dxvk_cpp_std]) executable('hlsl-compiler'+exe_ext, files('test_hlsl_compiler.cpp'), dependencies : [ test_dxbc_deps, lib_d3dcompiler ], install : true, override_options: ['cpp_std='+dxvk_cpp_std])