mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 09:26:52 +00:00
Add test to show drawcall count is incorrect
This commit is contained in:
committed by
Baldur Karlsson
parent
bbbdba1728
commit
f64cba8e91
@@ -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));
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user