Commit edadbed6 by David Neto

HLSL: Avoid leaking a shadow sampler struct

parent 4c096c52
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "hlslGrammar.h" #include "hlslGrammar.h"
#include "hlslAttributes.h" #include "hlslAttributes.h"
#include "../glslang/Include/Common.h"
#include "../glslang/MachineIndependent/Scan.h" #include "../glslang/MachineIndependent/Scan.h"
#include "../glslang/MachineIndependent/preprocessor/PpContext.h" #include "../glslang/MachineIndependent/preprocessor/PpContext.h"
...@@ -3129,7 +3130,7 @@ TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc ...@@ -3129,7 +3130,7 @@ TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc
if (textureShadowEntry != textureShadowVariant.end()) if (textureShadowEntry != textureShadowVariant.end())
newId = textureShadowEntry->second->get(shadowMode); newId = textureShadowEntry->second->get(shadowMode);
else else
textureShadowVariant[texSymbol->getId()] = new tShadowTextureSymbols; textureShadowVariant[texSymbol->getId()] = NewPoolObject(tShadowTextureSymbols(), 1);
// Sometimes we have to create another symbol (if this texture has been seen before, // Sometimes we have to create another symbol (if this texture has been seen before,
// and we haven't created the form for this shadow mode). // and we haven't created the form for this shadow mode).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment