1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00
OpenDX/src/dxbc/dxbc_compiler.h

50 lines
985 B
C
Raw Normal View History

#pragma once
2017-10-17 13:02:57 +02:00
#include "dxbc_capability.h"
#include "dxbc_chunk_shex.h"
2017-10-17 13:02:57 +02:00
#include "dxbc_entrypoint.h"
#include "dxbc_typeinfo.h"
namespace dxvk {
/**
* \brief DXBC to SPIR-V compiler
*
*
*/
class DxbcCompiler {
public:
DxbcCompiler(DxbcProgramVersion version);
~DxbcCompiler();
/**
* \brief Processes a single instruction
* \param [in] ins The instruction
*/
void processInstruction(DxbcInstruction ins);
/**
* \brief Creates actual shader object
*
* Combines all information gatherd during the
* shader compilation into one shader object.
*/
Rc<DxvkShader> finalize();
private:
DxbcProgramVersion m_version;
DxvkSpirvIdCounter m_counter;
2017-10-17 13:02:57 +02:00
DxbcCapabilities m_spvCapabilities;
DxbcEntryPoint m_spvEntryPoints;
DxbcTypeInfo m_spvTypeInfo;
DxvkSpirvCodeBuffer m_spvCode;
2017-10-17 13:02:57 +02:00
uint32_t m_entryPointId = 0;
};
}