@@ -283,34 +283,34 @@ ze_result_t CommandQueueImp::CommandBufferManager::initialize(Device *device, si
283283 secondBuffer = device->getNEODevice ()->getMemoryManager ()->allocateGraphicsMemoryWithProperties (properties);
284284 }
285285
286- buffers[BUFFER_ALLOCATION :: FIRST ] = firstBuffer;
287- buffers[BUFFER_ALLOCATION :: SECOND ] = secondBuffer;
286+ buffers[BufferAllocation::first ] = firstBuffer;
287+ buffers[BufferAllocation::second ] = secondBuffer;
288288
289- if (!buffers[BUFFER_ALLOCATION :: FIRST ] || !buffers[BUFFER_ALLOCATION :: SECOND ]) {
289+ if (!buffers[BufferAllocation::first ] || !buffers[BufferAllocation::second ]) {
290290 return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ;
291291 }
292292
293- flushId[BUFFER_ALLOCATION :: FIRST ] = std::make_pair (0u , 0u );
294- flushId[BUFFER_ALLOCATION :: SECOND ] = std::make_pair (0u , 0u );
293+ flushId[BufferAllocation::first ] = std::make_pair (0u , 0u );
294+ flushId[BufferAllocation::second ] = std::make_pair (0u , 0u );
295295 return ZE_RESULT_SUCCESS ;
296296}
297297
298298void CommandQueueImp::CommandBufferManager::destroy (Device *device) {
299- if (buffers[BUFFER_ALLOCATION :: FIRST ]) {
300- device->storeReusableAllocation (*buffers[BUFFER_ALLOCATION :: FIRST ]);
301- buffers[BUFFER_ALLOCATION :: FIRST ] = nullptr ;
299+ if (buffers[BufferAllocation::first ]) {
300+ device->storeReusableAllocation (*buffers[BufferAllocation::first ]);
301+ buffers[BufferAllocation::first ] = nullptr ;
302302 }
303- if (buffers[BUFFER_ALLOCATION :: SECOND ]) {
304- device->storeReusableAllocation (*buffers[BUFFER_ALLOCATION :: SECOND ]);
305- buffers[BUFFER_ALLOCATION :: SECOND ] = nullptr ;
303+ if (buffers[BufferAllocation::second ]) {
304+ device->storeReusableAllocation (*buffers[BufferAllocation::second ]);
305+ buffers[BufferAllocation::second ] = nullptr ;
306306 }
307307}
308308
309309NEO ::WaitStatus CommandQueueImp::CommandBufferManager::switchBuffers (NEO ::CommandStreamReceiver *csr) {
310- if (bufferUse == BUFFER_ALLOCATION :: FIRST ) {
311- bufferUse = BUFFER_ALLOCATION :: SECOND ;
310+ if (bufferUse == BufferAllocation::first ) {
311+ bufferUse = BufferAllocation::second ;
312312 } else {
313- bufferUse = BUFFER_ALLOCATION :: FIRST ;
313+ bufferUse = BufferAllocation::first ;
314314 }
315315
316316 auto waitStatus{NEO ::WaitStatus::ready};
0 commit comments