mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-28 02:41:18 +00:00
Clear attrMask on bad shader compile.
This prevents various crashes when incorrect attributes are enabled.
This commit is contained in:
parent
9bde45d6f9
commit
7dfe8b58dc
@ -156,6 +156,9 @@ LinkedShader::LinkedShader(ShaderID VSID, Shader *vs, ShaderID FSID, Shader *fs,
|
||||
}
|
||||
// Prevent a buffer overflow.
|
||||
numBones = 0;
|
||||
// Avoid weird attribute enables.
|
||||
attrMask = 0;
|
||||
availableUniforms = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ static const GlTypeInfo GLComp[] = {
|
||||
};
|
||||
|
||||
static inline void VertexAttribSetup(int attrib, int fmt, int stride, u8 *ptr) {
|
||||
if (attrib != -1 && fmt) {
|
||||
if (fmt) {
|
||||
const GlTypeInfo &type = GLComp[fmt];
|
||||
glVertexAttribPointer(attrib, type.count, type.type, type.normalized, stride, ptr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user