Shader type read for translation.
This commit is contained in:
@@ -22,8 +22,56 @@ D3D11Shader::D3D11Shader(
|
||||
const uint8_t* src_ptr, size_t length,
|
||||
uint64_t hash) :
|
||||
Shader(type, src_ptr, length, hash) {
|
||||
// TODO(benvanik): create shader/translate/etc.
|
||||
device_ = device;
|
||||
device_->AddRef();
|
||||
}
|
||||
|
||||
D3D11Shader::~D3D11Shader() {
|
||||
device_->Release();
|
||||
}
|
||||
|
||||
|
||||
D3D11VertexShader::D3D11VertexShader(
|
||||
ID3D11Device* device,
|
||||
const uint8_t* src_ptr, size_t length,
|
||||
uint64_t hash) :
|
||||
handle_(0),
|
||||
D3D11Shader(device, XE_GPU_SHADER_TYPE_VERTEX,
|
||||
src_ptr, length, hash) {
|
||||
}
|
||||
|
||||
D3D11VertexShader::~D3D11VertexShader() {
|
||||
if (handle_) handle_->Release();
|
||||
}
|
||||
|
||||
int D3D11VertexShader::Prepare() {
|
||||
if (handle_) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO(benvanik): translate/etc.
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
D3D11PixelShader::D3D11PixelShader(
|
||||
ID3D11Device* device,
|
||||
const uint8_t* src_ptr, size_t length,
|
||||
uint64_t hash) :
|
||||
handle_(0),
|
||||
D3D11Shader(device, XE_GPU_SHADER_TYPE_PIXEL,
|
||||
src_ptr, length, hash) {
|
||||
}
|
||||
|
||||
D3D11PixelShader::~D3D11PixelShader() {
|
||||
if (handle_) handle_->Release();
|
||||
}
|
||||
|
||||
int D3D11PixelShader::Prepare() {
|
||||
if (handle_) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO(benvanik): translate/etc.
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user