mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-14 00:48:44 +01:00
43 lines
807 B
C
43 lines
807 B
C
|
#pragma once
|
||
|
|
||
|
#include "../dxvk/dxvk_shader.h"
|
||
|
|
||
|
#include "dxbc_chunk_shex.h"
|
||
|
#include "dxbc_header.h"
|
||
|
#include "dxbc_reader.h"
|
||
|
|
||
|
// References used for figuring out DXBC:
|
||
|
// - https://github.com/tgjones/slimshader-cpp
|
||
|
// - Wine
|
||
|
|
||
|
namespace dxvk {
|
||
|
|
||
|
/**
|
||
|
* \brief DXBC shader module
|
||
|
*
|
||
|
* Reads the DXBC byte code and extracts information
|
||
|
* about the resource bindings and the instruction
|
||
|
* stream. A module can then be compiled to SPIR-V.
|
||
|
*/
|
||
|
class DxbcModule {
|
||
|
|
||
|
public:
|
||
|
|
||
|
DxbcModule(DxbcReader& reader);
|
||
|
~DxbcModule();
|
||
|
|
||
|
/**
|
||
|
* \brief Compiles DXBC shader to SPIR-V module
|
||
|
* \returns The compiled DXVK shader object
|
||
|
*/
|
||
|
Rc<DxvkShader> compile() const;
|
||
|
|
||
|
private:
|
||
|
|
||
|
DxbcHeader m_header;
|
||
|
|
||
|
Rc<DxbcShex> m_shexChunk;
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|