[D3D12] Begin writing the DXBC translator
This commit is contained in:
42
src/xenia/gpu/dxbc_shader_translator.h
Normal file
42
src/xenia/gpu/dxbc_shader_translator.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2018 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_GPU_DXBC_SHADER_TRANSLATOR_H_
|
||||
#define XENIA_GPU_DXBC_SHADER_TRANSLATOR_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/gpu/shader_translator.h"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
|
||||
// Generates shader model 5_1 byte code (for Direct3D 12).
|
||||
class DxbcShaderTranslator : public ShaderTranslator {
|
||||
public:
|
||||
DxbcShaderTranslator();
|
||||
~DxbcShaderTranslator() override;
|
||||
|
||||
protected:
|
||||
void Reset() override;
|
||||
|
||||
std::vector<uint8_t> CompleteTranslation() override;
|
||||
|
||||
private:
|
||||
// Executable instructions - generated during translation.
|
||||
std::vector<uint32_t> shader_code_;
|
||||
// Complete shader object, with all the needed chunks and dcl_ instructions -
|
||||
// generated in the end of translation.
|
||||
std::vector<uint32_t> shader_object_;
|
||||
};
|
||||
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_GPU_DXBC_SHADER_TRANSLATOR_H_
|
||||
Reference in New Issue
Block a user