Add test to show drawcall count is incorrect

This commit is contained in:
thisisjimmyfb
2021-06-26 09:28:42 +01:00
committed by Baldur Karlsson
parent bbbdba1728
commit f64cba8e91
2 changed files with 20 additions and 0 deletions
+12
View File
@@ -306,6 +306,15 @@ void main()
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA32F, screenWidth, screenHeight);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colattach, 0);
// Depth texture
GLuint depthattach = MakeTexture();
glBindTexture(GL_TEXTURE_2D, depthattach);
glTexStorage2D(GL_TEXTURE_2D, 1, GL_DEPTH24_STENCIL8, screenWidth, screenHeight);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, depthattach,
0);
glClearDepth(0.0f);
while(Running())
{
glBindFramebuffer(GL_FRAMEBUFFER, 0);
@@ -313,6 +322,9 @@ void main()
float col[] = {0.2f, 0.2f, 0.2f, 1.0f};
glClearBufferfv(GL_COLOR, 0, col);
setMarker("GL_ClearDepth");
glClear(GL_DEPTH_BUFFER_BIT);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glBindVertexBuffer(0, vb, 0, sizeof(DefaultA2V));
glBindVertexBuffer(0, instvb, 0, sizeof(Vec4f));
+8
View File
@@ -39,3 +39,11 @@ class GL_Draw_Zoo(rdtest.Draw_Zoo):
self.check(pipe.IsStripRestartEnabled())
self.check((pipe.GetStripRestartIndex() & ((1 << (ib.byteStride*8)) - 1)) == 0xffff)
draw = self.find_draw("GL_ClearDepth")
self.check(draw is not None)
draw = draw.next
self.check(draw.flags & (rd.DrawFlags.Clear|rd.DrawFlags.ClearDepthStencil) == (rd.DrawFlags.Clear|rd.DrawFlags.ClearDepthStencil))