OpenGL: Add an assert to catch a class of crash bugs early. Also assorted paranoia.
This commit is contained in:
parent
a41fc74dba
commit
d4249c1d73
4 changed files with 13 additions and 0 deletions
|
@ -1487,6 +1487,11 @@ void VKContext::DrawIndexed(int vertexCount, int offset) {
|
|||
}
|
||||
|
||||
void VKContext::DrawUP(const void *vdata, int vertexCount) {
|
||||
_dbg_assert_(vertexCount >= 0);
|
||||
if (vertexCount <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
VkBuffer vulkanVbuf, vulkanUBObuf;
|
||||
size_t vbBindOffset = push_->Push(vdata, vertexCount * curPipeline_->stride[0], 4, &vulkanVbuf);
|
||||
uint32_t ubo_offset = (uint32_t)curPipeline_->PushUBO(push_, vulkan_, &vulkanUBObuf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue