diff --git a/src/gx/d3d/CGxDeviceD3d.cpp b/src/gx/d3d/CGxDeviceD3d.cpp index 6e4f0ca..d930d71 100644 --- a/src/gx/d3d/CGxDeviceD3d.cpp +++ b/src/gx/d3d/CGxDeviceD3d.cpp @@ -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 }