Skip to content

Commit 2312633

Browse files
committed
[example48] fix begin flag bug + small change
1 parent d89d319 commit 2312633

File tree

1 file changed

+3
-2
lines changed
  • examples_tests/48.ArithmeticUnitTest

1 file changed

+3
-2
lines changed

examples_tests/48.ArithmeticUnitTest/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ bool runTest(
247247
{
248248
// TODO: overlap dispatches with memory readbacks (requires multiple copies of `buffers`)
249249

250-
cmdbuf->begin(IGPUCommandBuffer::ERF_RELEASE_RESOURCES_BIT);
250+
cmdbuf->begin(IGPUCommandBuffer::EU_NONE);
251251
cmdbuf->bindComputePipeline(pipeline);
252252
cmdbuf->bindDescriptorSets(asset::EPBP_COMPUTE,pipeline->getLayout(),0u,1u,&ds);
253253
const uint32_t workgroupCount = BUFFER_DWORD_COUNT/workgroupSize;
@@ -305,7 +305,7 @@ class ArythmeticUnitTestApp : public NonGraphicalApplicationBase
305305
void onAppInitialized_impl() override
306306
{
307307
CommonAPI::InitOutput initOutput;
308-
CommonAPI::InitWithNoExt(initOutput, video::EAT_VULKAN, "Subgroup Arithmetic Test");
308+
CommonAPI::InitWithNoExt(initOutput, video::EAT_OPENGL, "Subgroup Arithmetic Test");
309309
gl = std::move(initOutput.apiConnection);
310310
gpuPhysicalDevice = std::move(initOutput.physicalDevice);
311311
logicalDevice = std::move(initOutput.logicalDevice);
@@ -380,6 +380,7 @@ class ArythmeticUnitTestApp : public NonGraphicalApplicationBase
380380
assert(mreq.memoryTypeBits);
381381
// (Erfan to Cyprian) We usually don't use the return value (SMemoryOffset) of the allocate function but make sure you set it to some variable named bufferMem or something so we know it's there
382382
auto bufferMem = logicalDevice->allocate(mreq, buffers[i].get());
383+
assert(bufferMem.isValid())
383384

384385
IDeviceMemoryAllocation::MappedMemoryRange mem;
385386
mem.memory = buffers[i]->getBoundMemory();

0 commit comments

Comments
 (0)