mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Clean up code for nullptr device check during cmdlist create
Signed-off-by: Vinod Tipparaju <vinod.tipparaju@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
905d59d7e3
commit
240563099c
@ -40,8 +40,6 @@ struct EncodeStateBaseAddress;
|
||||
|
||||
inline ze_result_t parseErrorCode(NEO::ErrorCode returnValue) {
|
||||
switch (returnValue) {
|
||||
case NEO::ErrorCode::INVALID_DEVICE:
|
||||
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
|
||||
case NEO::ErrorCode::OUT_OF_DEVICE_MEMORY:
|
||||
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
default:
|
||||
|
@ -36,9 +36,7 @@ ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal) {
|
||||
NEO::GraphicsAllocation *bufferAllocation = buffers.getCurrentBufferAllocation();
|
||||
commandStream = new NEO::LinearStream(bufferAllocation->getUnderlyingBuffer(),
|
||||
defaultQueueCmdBufferSize);
|
||||
if (!commandStream) {
|
||||
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
}
|
||||
UNRECOVERABLE_IF(commandStream == nullptr);
|
||||
commandStream->replaceGraphicsAllocation(bufferAllocation);
|
||||
isCopyOnlyCommandQueue = copyOnly;
|
||||
}
|
||||
|
Reference in New Issue
Block a user