Fix handling of doubles in GL transform feedback

This commit is contained in:
baldurk
2019-05-24 17:12:55 +01:00
parent 5368709111
commit 0e7d1cd62a
+4 -1
View File
@@ -872,6 +872,7 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId)
drv.glAttachShader(feedbackProg, stageShaders[i]);
varyings.clear();
matrixVaryings.clear();
stride = 0;
posidx = -1;
@@ -906,7 +907,9 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId)
if(sig.systemValue == ShaderBuiltin::Position)
posidx = int32_t(varyings.size()) - 1;
stride += sizeof(float) * sig.compCount;
uint32_t elemSize = sig.compType == CompType::Double ? sizeof(double) : sizeof(float);
stride += elemSize * sig.compCount;
}
// shift position attribute up to first, keeping order otherwise