2017-10-16 17:50:09 +02:00
|
|
|
#pragma once
|
|
|
|
|
2017-11-13 00:22:52 +01:00
|
|
|
#include "./gen/dxbc_gen_common.h"
|
2017-10-16 17:50:09 +02:00
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
/**
|
2017-11-13 00:22:52 +01:00
|
|
|
* \brief DXBC compiler
|
|
|
|
*
|
|
|
|
* Interprets DXBC instructions and generates
|
|
|
|
* SPIR-V code for the appropriate shader type.
|
2017-10-16 17:50:09 +02:00
|
|
|
*/
|
|
|
|
class DxbcCompiler {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2017-11-01 00:01:40 +01:00
|
|
|
DxbcCompiler(
|
2017-11-13 00:22:52 +01:00
|
|
|
const DxbcProgramVersion& version);
|
2017-10-16 17:50:09 +02:00
|
|
|
~DxbcCompiler();
|
|
|
|
|
2017-11-01 00:01:40 +01:00
|
|
|
void processInstruction(
|
2017-11-13 00:22:52 +01:00
|
|
|
const DxbcInstruction& ins);
|
|
|
|
|
2017-10-16 17:50:09 +02:00
|
|
|
Rc<DxvkShader> finalize();
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2017-11-13 00:22:52 +01:00
|
|
|
Rc<DxbcCodeGen> m_gen;
|
|
|
|
|
|
|
|
void dclGlobalFlags(
|
|
|
|
const DxbcInstruction& ins);
|
|
|
|
|
2017-11-13 02:07:13 +01:00
|
|
|
void dclInterfaceVar(
|
2017-11-13 00:22:52 +01:00
|
|
|
const DxbcInstruction& ins);
|
|
|
|
|
|
|
|
void dclTemps(
|
|
|
|
const DxbcInstruction& ins);
|
2017-10-16 19:53:17 +02:00
|
|
|
|
2017-10-16 17:50:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|