mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 01:55:21 +03:00
feat(gx): set d3d shader targets
This commit is contained in:
parent
f818d5f397
commit
5d49ab72c4
@ -674,7 +674,33 @@ void CGxDeviceD3d::ISetCaps(const CGxFormat& format) {
|
||||
|
||||
// Shader targets
|
||||
|
||||
// TODO
|
||||
auto pixelShaderVersion = this->m_d3dCaps.PixelShaderVersion;
|
||||
|
||||
if (pixelShaderVersion >= D3DPS_VERSION(3, 0)) {
|
||||
this->m_caps.m_pixelShaderTarget = GxShPS_ps_3_0;
|
||||
} else if (pixelShaderVersion >= D3DPS_VERSION(2, 0)) {
|
||||
this->m_caps.m_pixelShaderTarget = GxShPS_ps_2_0;
|
||||
} else if (pixelShaderVersion >= D3DPS_VERSION(1, 4)) {
|
||||
this->m_caps.m_pixelShaderTarget = GxShPS_ps_1_4;
|
||||
} else if (pixelShaderVersion >= D3DPS_VERSION(1, 1)) {
|
||||
this->m_caps.m_pixelShaderTarget = GxShPS_ps_1_1;
|
||||
}
|
||||
|
||||
if (this->m_caps.m_pixelShaderTarget != GxShPS_none) {
|
||||
auto vertexShaderVersion = this->m_d3dCaps.VertexShaderVersion;
|
||||
|
||||
if (vertexShaderVersion >= D3DVS_VERSION(3, 0)) {
|
||||
this->m_caps.m_vertexShaderTarget = GxShVS_vs_3_0;
|
||||
} else if (vertexShaderVersion >= D3DVS_VERSION(2, 0)) {
|
||||
this->m_caps.m_vertexShaderTarget = GxShVS_vs_2_0;
|
||||
} else if (vertexShaderVersion == D3DVS_VERSION(1, 1)) {
|
||||
this->m_caps.m_vertexShaderTarget = GxShVS_vs_1_1;
|
||||
}
|
||||
|
||||
// TODO maxVertexShaderConst
|
||||
}
|
||||
|
||||
// TODO modify shader targets based on format
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user