Shader type read for translation.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
using namespace xe;
|
||||
using namespace xe::gpu;
|
||||
using namespace xe::gpu::d3d11;
|
||||
using namespace xe::gpu::xenos;
|
||||
|
||||
|
||||
D3D11ShaderCache::D3D11ShaderCache(ID3D11Device* device) {
|
||||
@@ -30,9 +31,15 @@ Shader* D3D11ShaderCache::CreateCore(
|
||||
xenos::XE_GPU_SHADER_TYPE type,
|
||||
const uint8_t* src_ptr, size_t length,
|
||||
uint32_t hash) {
|
||||
return new D3D11Shader(
|
||||
device_,
|
||||
type,
|
||||
src_ptr, length,
|
||||
hash);
|
||||
switch (type) {
|
||||
case XE_GPU_SHADER_TYPE_VERTEX:
|
||||
return new D3D11VertexShader(
|
||||
device_, src_ptr, length, hash);
|
||||
case XE_GPU_SHADER_TYPE_PIXEL:
|
||||
return new D3D11PixelShader(
|
||||
device_, src_ptr, length, hash);
|
||||
default:
|
||||
XEASSERTALWAYS();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user