mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Increase GL_Large_Buffer test to check >2GB buffer
This commit is contained in:
@@ -2317,8 +2317,8 @@ uint32_t GLReplay::PickVertex(uint32_t eventId, int32_t width, int32_t height,
|
||||
|
||||
drv.glBindBuffer(eGL_COPY_READ_BUFFER, ib);
|
||||
|
||||
GLint bufsize = 0;
|
||||
drv.glGetBufferParameteriv(eGL_COPY_READ_BUFFER, eGL_BUFFER_SIZE, &bufsize);
|
||||
GLuint bufsize = 0;
|
||||
drv.glGetBufferParameteriv(eGL_COPY_READ_BUFFER, eGL_BUFFER_SIZE, (GLint *)&bufsize);
|
||||
|
||||
drv.glGetBufferSubData(eGL_COPY_READ_BUFFER, (GLintptr)cfg.position.indexByteOffset,
|
||||
RDCMIN(uint32_t(bufsize) - uint32_t(cfg.position.indexByteOffset),
|
||||
|
||||
@@ -144,8 +144,8 @@ void GLReplay::RenderMesh(uint32_t eventId, const rdcarray<MeshFormat> &secondar
|
||||
drv.glBindVertexBuffer(0, vb, (GLintptr)fmt.vertexByteOffset, fmt.vertexByteStride);
|
||||
|
||||
{
|
||||
GLint bytesize = 0;
|
||||
drv.glGetNamedBufferParameterivEXT(vb, eGL_BUFFER_SIZE, &bytesize);
|
||||
GLuint bytesize = 0;
|
||||
drv.glGetNamedBufferParameterivEXT(vb, eGL_BUFFER_SIZE, (GLint *)&bytesize);
|
||||
|
||||
// skip empty source buffers
|
||||
if(bytesize == 0)
|
||||
@@ -286,8 +286,8 @@ void GLReplay::RenderMesh(uint32_t eventId, const rdcarray<MeshFormat> &secondar
|
||||
m_pDriver->GetResourceManager()->GetCurrentResource(meshData[i]->vertexResourceId).name;
|
||||
|
||||
{
|
||||
GLint bytesize = 0;
|
||||
drv.glGetNamedBufferParameterivEXT(vb, eGL_BUFFER_SIZE, &bytesize);
|
||||
GLuint bytesize = 0;
|
||||
drv.glGetNamedBufferParameterivEXT(vb, eGL_BUFFER_SIZE, (GLint *)&bytesize);
|
||||
|
||||
// skip empty source buffers
|
||||
if(bytesize == 0)
|
||||
|
||||
@@ -658,15 +658,15 @@ BufferDescription GLReplay::GetBuffer(ResourceId id)
|
||||
|
||||
ret.creationFlags = res.creationFlags;
|
||||
|
||||
GLint size = 0;
|
||||
GLuint size = 0;
|
||||
// if the type is NONE it's probably a DSA created buffer
|
||||
if(res.curType == eGL_NONE)
|
||||
{
|
||||
drv.glGetNamedBufferParameterivEXT(res.resource.name, eGL_BUFFER_SIZE, &size);
|
||||
drv.glGetNamedBufferParameterivEXT(res.resource.name, eGL_BUFFER_SIZE, (GLint *)&size);
|
||||
}
|
||||
else
|
||||
{
|
||||
drv.glGetBufferParameteriv(res.curType, eGL_BUFFER_SIZE, &size);
|
||||
drv.glGetBufferParameteriv(res.curType, eGL_BUFFER_SIZE, (GLint *)&size);
|
||||
}
|
||||
|
||||
ret.length = size;
|
||||
|
||||
@@ -247,8 +247,8 @@ bool WrappedOpenGL::Check_SafeDraw(bool indexed)
|
||||
}
|
||||
else
|
||||
{
|
||||
GLint size = 0;
|
||||
GL.glGetNamedBufferParameterivEXT(vb, eGL_BUFFER_SIZE, &size);
|
||||
GLuint size = 0;
|
||||
GL.glGetNamedBufferParameterivEXT(vb, eGL_BUFFER_SIZE, (GLint *)&size);
|
||||
|
||||
if(size == 0)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ RD_TEST(GL_Large_Buffer, OpenGLGraphicsTest)
|
||||
GLuint vao = MakeVAO();
|
||||
glBindVertexArray(vao);
|
||||
|
||||
uint32_t indices[3] = {0, 1000000, 2345678};
|
||||
uint32_t indices[3] = {0, 1000000, 61982400};
|
||||
|
||||
GLuint ib = MakeBuffer();
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib);
|
||||
@@ -46,7 +46,7 @@ RD_TEST(GL_Large_Buffer, OpenGLGraphicsTest)
|
||||
|
||||
GLuint vb = MakeBuffer();
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vb);
|
||||
glBufferStorage(GL_ARRAY_BUFFER, 128 * 1024 * 1024, 0, GL_DYNAMIC_STORAGE_BIT);
|
||||
glBufferStorage(GL_ARRAY_BUFFER, 2128ULL * 1024 * 1024, 0, GL_DYNAMIC_STORAGE_BIT);
|
||||
|
||||
glBufferSubData(GL_ARRAY_BUFFER, indices[0] * sizeof(DefaultA2V), sizeof(DefaultA2V),
|
||||
&DefaultTri[0]);
|
||||
|
||||
@@ -28,7 +28,7 @@ class GL_Large_Buffer(rdtest.TestCase):
|
||||
},
|
||||
2: {
|
||||
'vtx': 2,
|
||||
'idx': 2345678,
|
||||
'idx': 61982400,
|
||||
'Position': [0.5, -0.5, 0.0],
|
||||
'Color': [0.0, 1.0, 0.0, 1.0],
|
||||
#'UV': [1.0, 0.0],
|
||||
@@ -58,7 +58,7 @@ class GL_Large_Buffer(rdtest.TestCase):
|
||||
},
|
||||
2: {
|
||||
'vtx': 2,
|
||||
'idx': 2345678,
|
||||
'idx': 61982400,
|
||||
'gl_Position': [0.5, -0.5, 0.0, 1.0],
|
||||
'v2f_block.pos': [0.5, -0.5, 0.0, 1.0],
|
||||
'v2f_block.col': [0.0, 1.0, 0.0, 1.0],
|
||||
|
||||
Reference in New Issue
Block a user