mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-21 11:31:41 +00:00
- fixed two index out of range issues in Vulkan's shader compiler code.
This commit is contained in:
parent
7057b7cdf1
commit
648dc87101
1 changed files with 2 additions and 2 deletions
|
@ -99,13 +99,13 @@ bool VkShaderManager::CompileNextShader()
|
||||||
if (compileIndex >= MAX_EFFECTS)
|
if (compileIndex >= MAX_EFFECTS)
|
||||||
{
|
{
|
||||||
compileIndex = 0;
|
compileIndex = 0;
|
||||||
|
compilePass++;
|
||||||
if (compilePass == MAX_PASS_TYPES)
|
if (compilePass == MAX_PASS_TYPES)
|
||||||
{
|
{
|
||||||
compileIndex = -1; // we're done.
|
compileIndex = -1; // we're done.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
compileState = 0;
|
compileState = 0;
|
||||||
compilePass++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -135,7 +135,7 @@ VkShaderProgram *VkShaderManager::Get(unsigned int eff, bool alphateston, EPassT
|
||||||
{
|
{
|
||||||
if (compileIndex != -1) return &mMaterialShaders[0][0];
|
if (compileIndex != -1) return &mMaterialShaders[0][0];
|
||||||
// indices 0-2 match the warping modes, 3 no texture, the following are custom
|
// indices 0-2 match the warping modes, 3 no texture, the following are custom
|
||||||
if (!alphateston && eff <= SHADER_NoTexture)
|
if (!alphateston && eff < SHADER_NoTexture)
|
||||||
{
|
{
|
||||||
return &mMaterialShadersNAT[passType][eff]; // Non-alphatest shaders are only created for default, warp1+2. The rest won't get used anyway
|
return &mMaterialShadersNAT[passType][eff]; // Non-alphatest shaders are only created for default, warp1+2. The rest won't get used anyway
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue