mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 07:24:15 +01:00
[d3d8] Adjust shader handles to skip 0x0001
This commit is contained in:
parent
980a8d185c
commit
36907ec01c
@ -18,7 +18,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
static constexpr DWORD getShaderIndex(DWORD Handle) {
|
static constexpr DWORD getShaderIndex(DWORD Handle) {
|
||||||
if ((Handle & D3DFVF_RESERVED0) != 0) {
|
if ((Handle & D3DFVF_RESERVED0) != 0) {
|
||||||
return (Handle & ~(D3DFVF_RESERVED0)) >> 1;
|
return ((Handle & ~(D3DFVF_RESERVED0)) >> 1) - 1;
|
||||||
} else {
|
} else {
|
||||||
return Handle;
|
return Handle;
|
||||||
}
|
}
|
||||||
@ -1657,7 +1657,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (likely(SUCCEEDED(res))) {
|
if (likely(SUCCEEDED(res))) {
|
||||||
// Set bit to indicate this is not an FVF
|
// Set bit to indicate this is not an FVF
|
||||||
*pHandle = getShaderHandle(m_vertexShaders.size() - 1);
|
*pHandle = getShaderHandle(m_vertexShaders.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@ -1858,7 +1858,7 @@ namespace dxvk {
|
|||||||
if (likely(SUCCEEDED(res))) {
|
if (likely(SUCCEEDED(res))) {
|
||||||
m_pixelShaders.push_back(pPixelShader);
|
m_pixelShaders.push_back(pPixelShader);
|
||||||
// Still set the shader bit, to prevent conflicts with NULL.
|
// Still set the shader bit, to prevent conflicts with NULL.
|
||||||
*pHandle = getShaderHandle(m_pixelShaders.size() - 1);
|
*pHandle = getShaderHandle(m_pixelShaders.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
Reference in New Issue
Block a user