[SPIR-V] New flag: spv_disasm - Generate disassembly for spir-v shaders (disabled by default)
This commit is contained in:
parent
8ec8d9778f
commit
6b4e8ee19e
|
@ -20,6 +20,7 @@
|
|||
#include "xenia/gpu/spirv/passes/control_flow_simplification_pass.h"
|
||||
|
||||
DEFINE_bool(spv_validate, false, "Validate SPIR-V shaders after generation");
|
||||
DEFINE_bool(spv_disasm, false, "Disassemble SPIR-V shaders after generation");
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
|
@ -637,6 +638,7 @@ void SpirvShaderTranslator::PostTranslation(Shader* shader) {
|
|||
}
|
||||
}
|
||||
|
||||
if (FLAGS_spv_disasm) {
|
||||
// TODO(benvanik): only if needed? could be slowish.
|
||||
auto disasm = disassembler_.Disassemble(
|
||||
reinterpret_cast<const uint32_t*>(shader->translated_binary().data()),
|
||||
|
@ -646,6 +648,7 @@ void SpirvShaderTranslator::PostTranslation(Shader* shader) {
|
|||
} else {
|
||||
set_host_disassembly(shader, disasm->to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SpirvShaderTranslator::PreProcessControlFlowInstructions(
|
||||
|
|
Loading…
Reference in New Issue