mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fix texel buffer detection in shaders.
This commit is contained in:
@@ -1073,7 +1073,7 @@ bool Shader::validateInternal(StrongRef<ShaderStage> stages[], std::string &err,
|
||||
|
||||
const auto &sampler = type->getSampler();
|
||||
|
||||
if (type->isTexture() && type->getSampler().isCombined())
|
||||
if (type->isTexture() && type->getSampler().isCombined() && !sampler.isBuffer())
|
||||
{
|
||||
u.baseType = UNIFORM_SAMPLER;
|
||||
u.dataBaseType = getBaseType(sampler.getBasicType());
|
||||
@@ -1122,7 +1122,7 @@ bool Shader::validateInternal(StrongRef<ShaderStage> stages[], std::string &err,
|
||||
|
||||
reflection.storageTextures[u.name] = u;
|
||||
}
|
||||
else if (type->getBasicType() == glslang::EbtSampler && type->getSampler().isBuffer())
|
||||
else if (type->getBasicType() == glslang::EbtSampler && sampler.isBuffer())
|
||||
{
|
||||
u.baseType = UNIFORM_TEXELBUFFER;
|
||||
u.dataBaseType = getBaseType(sampler.getBasicType());
|
||||
|
||||
Reference in New Issue
Block a user