Skip to content

Commit ee46628

Browse files
committed
QueryPool reset fix
1 parent 7aac37e commit ee46628

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/nbl/video/COpenGLCommandBuffer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,9 @@ COpenGLCommandBuffer::~COpenGLCommandBuffer()
912912
case impl::ECT_RESET_QUERY_POOL:
913913
{
914914
auto& c = cmd.get<impl::ECT_RESET_QUERY_POOL>();
915-
const COpenGLQueryPool* qp = static_cast<const COpenGLQueryPool*>(c.queryPool.get());
916-
qp->resetQueries(gl, c.query, c.queryCount);
915+
COpenGLQueryPool* qp = static_cast<COpenGLQueryPool*>(c.queryPool.get());
916+
bool success = qp->resetQueries(gl, c.query, c.queryCount);
917+
assert(success);
917918
}
918919
break;
919920
case impl::ECT_BEGIN_QUERY:

src/nbl/video/COpenGLCommandBuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ namespace impl
304304
};
305305
_NBL_DEFINE_SCMD_SPEC(ECT_RESET_QUERY_POOL)
306306
{
307-
core::smart_refctd_ptr<const IQueryPool> queryPool;
307+
core::smart_refctd_ptr<IQueryPool> queryPool;
308308
uint32_t query;
309309
uint32_t queryCount;
310310
};
@@ -1075,7 +1075,7 @@ class COpenGLCommandBuffer final : public IGPUCommandBuffer
10751075
if (!this->isCompatibleDevicewise(queryPool))
10761076
return false;
10771077
SCmd<impl::ECT_RESET_QUERY_POOL> cmd;
1078-
cmd.queryPool = core::smart_refctd_ptr<const IQueryPool>(queryPool);
1078+
cmd.queryPool = core::smart_refctd_ptr<IQueryPool>(queryPool);
10791079
cmd.query = firstQuery;
10801080
cmd.queryCount = queryCount;
10811081
pushCommand(std::move(cmd));

0 commit comments

Comments
 (0)