Skip to content

Commit

Permalink
Remove unnecessary casts.
Browse files Browse the repository at this point in the history
Change-Id: I2d293d065c7efa006efe7d60a625cba0c6116c86
  • Loading branch information
PiotrFusik authored and Compute-Runtime-Automation committed Dec 18, 2018
1 parent 4b4b886 commit e8a7113
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion runtime/command_queue/command_queue_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class CommandQueueHw : public CommandQueue {

protected:
MOCKABLE_VIRTUAL void enqueueHandlerHook(const unsigned int commandType, const MultiDispatchInfo &dispatchInfo){};
size_t calculateHostPtrSizeForImage(size_t *region, size_t rowPitch, size_t slicePitch, Image *image);
size_t calculateHostPtrSizeForImage(const size_t *region, size_t rowPitch, size_t slicePitch, Image *image);

private:
bool isTaskLevelUpdateRequired(const uint32_t &taskLevel, const cl_event *eventWaitList, const cl_uint &numEventsInWaitList, unsigned int commandType);
Expand Down
6 changes: 3 additions & 3 deletions runtime/command_queue/enqueue_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
CompletionStamp completionStamp;
if (!blockQueue) {
if (parentKernel) {
size_t minSizeSSHForEM = KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*parentKernel));
size_t minSizeSSHForEM = KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);

uint32_t taskCount = getCommandStreamReceiver().peekTaskCount() + 1;
devQueueHw->setupExecutionModelDispatch(getIndirectHeap(IndirectHeap::SURFACE_STATE, minSizeSSHForEM),
Expand Down Expand Up @@ -406,7 +406,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,

if (blockQueue) {
if (parentKernel) {
size_t minSizeSSHForEM = KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*parentKernel));
size_t minSizeSSHForEM = KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
blockedCommandsData->surfaceStateHeapSizeEM = minSizeSSHForEM;
}

Expand Down Expand Up @@ -730,7 +730,7 @@ void CommandQueueHw<GfxFamily>::computeOffsetsValueForRectCommands(size_t *buffe
}

template <typename GfxFamily>
size_t CommandQueueHw<GfxFamily>::calculateHostPtrSizeForImage(size_t *region, size_t rowPitch, size_t slicePitch, Image *image) {
size_t CommandQueueHw<GfxFamily>::calculateHostPtrSizeForImage(const size_t *region, size_t rowPitch, size_t slicePitch, Image *image) {
auto bytesPerPixel = image->getSurfaceFormatInfo().ImageElementSizeInBytes;
auto dstRowPitch = rowPitch ? rowPitch : region[0] * bytesPerPixel;
auto dstSlicePitch = slicePitch ? slicePitch : ((image->getImageDesc().image_type == CL_MEM_OBJECT_IMAGE1D_ARRAY ? 1 : region[1]) * dstRowPitch);
Expand Down
2 changes: 1 addition & 1 deletion runtime/command_queue/enqueue_read_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadImage(

BuiltInOwnershipWrapper builtInLock(builder, this->context);

size_t hostPtrSize = calculateHostPtrSizeForImage(const_cast<size_t *>(region), inputRowPitch, inputSlicePitch, srcImage);
size_t hostPtrSize = calculateHostPtrSizeForImage(region, inputRowPitch, inputSlicePitch, srcImage);
void *dstPtr = ptr;

MemObjSurface srcImgSurf(srcImage);
Expand Down
2 changes: 1 addition & 1 deletion runtime/command_queue/enqueue_write_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteImage(

BuiltInOwnershipWrapper lock(builder, this->context);

size_t hostPtrSize = calculateHostPtrSizeForImage(const_cast<size_t *>(region), inputRowPitch, inputSlicePitch, dstImage);
size_t hostPtrSize = calculateHostPtrSizeForImage(region, inputRowPitch, inputSlicePitch, dstImage);
void *srcPtr = const_cast<void *>(ptr);

MemObjSurface dstImgSurf(dstImage);
Expand Down
2 changes: 1 addition & 1 deletion runtime/command_queue/gpgpu_walker.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ IndirectHeap &getIndirectHeap(CommandQueue &commandQueue, const MultiDispatchInf

if (Kernel *parentKernel = multiDispatchInfo.peekParentKernel()) {
if (heapType == IndirectHeap::SURFACE_STATE) {
expectedSize += KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<heapType>(const_cast<const Kernel &>(*parentKernel));
expectedSize += KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<heapType>(*parentKernel);
} else //if (heapType == IndirectHeap::DYNAMIC_STATE || heapType == IndirectHeap::INDIRECT_OBJECT)
{
DeviceQueueHw<GfxFamily> *pDevQueue = castToObject<DeviceQueueHw<GfxFamily>>(commandQueue.getContext().getDefaultDeviceQueue());
Expand Down
2 changes: 1 addition & 1 deletion runtime/helpers/base_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ inline DerivedType *castToObjectOrAbort(typename DerivedType::BaseType *object)

template <typename DerivedType>
inline const DerivedType *castToObject(const typename DerivedType::BaseType *object) {
return const_cast<const DerivedType *>(castToObject<DerivedType>(const_cast<typename DerivedType::BaseType *>(object)));
return castToObject<DerivedType>(const_cast<typename DerivedType::BaseType *>(object));
}

template <typename DerivedType>
Expand Down
4 changes: 2 additions & 2 deletions runtime/kernel/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1939,7 +1939,7 @@ void Kernel::ReflectionSurfaceHelper::setParentImageParams(void *reflectionSurfa
uint32_t numArgs = (uint32_t)parentArguments.size();
for (uint32_t i = 0; i < numArgs; i++) {
if (parentArguments[i].type == Kernel::kernelArgType::IMAGE_OBJ) {
const Image *image = const_cast<const Image *>(castToObject<Image>((cl_mem)parentArguments[i].object));
const Image *image = castToObject<Image>((cl_mem)parentArguments[i].object);
if (image) {
pImageParameters->m_ArraySize = (uint32_t)image->getImageDesc().image_array_size;
pImageParameters->m_Depth = (uint32_t)image->getImageDesc().image_depth;
Expand All @@ -1964,7 +1964,7 @@ void Kernel::ReflectionSurfaceHelper::setParentSamplerParams(void *reflectionSur
uint32_t numArgs = (uint32_t)parentArguments.size();
for (uint32_t i = 0; i < numArgs; i++) {
if (parentArguments[i].type == Kernel::kernelArgType::SAMPLER_OBJ) {
const Sampler *sampler = const_cast<const Sampler *>(castToObject<Sampler>((cl_sampler)parentArguments[i].object));
const Sampler *sampler = castToObject<Sampler>((cl_sampler)parentArguments[i].object);
if (sampler) {
pParentSamplerParams->CoordinateSnapRequired = (uint32_t)sampler->getSnapWaValue();
pParentSamplerParams->m_AddressingMode = (uint32_t)sampler->addressingMode;
Expand Down
2 changes: 1 addition & 1 deletion runtime/mem_obj/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Buffer *Buffer::create(Context *context,
properties.flags,
size,
memory->getUnderlyingBuffer(),
const_cast<void *>(hostPtr),
hostPtr,
memory,
zeroCopyAllowed,
isHostPtrSVM,
Expand Down
2 changes: 1 addition & 1 deletion runtime/mem_obj/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ cl_int Image::validateImageTraits(Context *context, cl_mem_flags flags, const cl
return CL_SUCCESS;
}

size_t Image::calculateHostPtrSize(size_t *region, size_t rowPitch, size_t slicePitch, size_t pixelSize, uint32_t imageType) {
size_t Image::calculateHostPtrSize(const size_t *region, size_t rowPitch, size_t slicePitch, size_t pixelSize, uint32_t imageType) {
DEBUG_BREAK_IF(!((rowPitch != 0) && (slicePitch != 0)));
size_t sizeToReturn = 0u;

Expand Down
2 changes: 1 addition & 1 deletion runtime/mem_obj/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Image : public MemObj {

static cl_int validateImageTraits(Context *context, cl_mem_flags flags, const cl_image_format *imageFormat, const cl_image_desc *imageDesc, const void *hostPtr);

static size_t calculateHostPtrSize(size_t *region, size_t rowPitch, size_t slicePitch, size_t pixelSize, uint32_t imageType);
static size_t calculateHostPtrSize(const size_t *region, size_t rowPitch, size_t slicePitch, size_t pixelSize, uint32_t imageType);

static void calculateHostPtrOffset(size_t *imageOffset, const size_t *origin, const size_t *region, size_t rowPitch, size_t slicePitch, uint32_t imageType, size_t bytesPerPixel);

Expand Down
8 changes: 4 additions & 4 deletions runtime/os_interface/linux/hw_info_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
auto pWaTable = std::unique_ptr<WorkaroundTable>(new WorkaroundTable);
*pWaTable = *(inHwInfo->pWaTable);

outHwInfo->pPlatform = const_cast<const PLATFORM *>(pPlatform.get());
outHwInfo->pSysInfo = const_cast<const GT_SYSTEM_INFO *>(pSysInfo.get());
outHwInfo->pSkuTable = const_cast<const FeatureTable *>(pSkuTable.get());
outHwInfo->pWaTable = const_cast<const WorkaroundTable *>(pWaTable.get());
outHwInfo->pPlatform = pPlatform.get();
outHwInfo->pSysInfo = pSysInfo.get();
outHwInfo->pSkuTable = pSkuTable.get();
outHwInfo->pWaTable = pWaTable.get();
outHwInfo->capabilityTable = inHwInfo->capabilityTable;

int val = 0;
Expand Down
40 changes: 20 additions & 20 deletions unit_tests/api/cl_intel_accelerator_tests.inl
Original file line number Diff line number Diff line change
Expand Up @@ -161,42 +161,42 @@ TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCountWithNullReturnExpectPas
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCount1ExpectPass) {
cl_uint parm_value = static_cast<cl_uint>(-1);
cl_uint param_value = static_cast<cl_uint>(-1);

result = clGetAcceleratorInfoINTEL(
accelerator,
CL_ACCELERATOR_REFERENCE_COUNT_INTEL,
sizeof(cl_uint),
reinterpret_cast<void *>(&parm_value),
&param_value,
nullptr);

EXPECT_EQ(CL_SUCCESS, result);
EXPECT_EQ(1u, parm_value);
EXPECT_EQ(1u, param_value);
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCountWithLongReturnExpectPass) {
cl_uint parm_value = static_cast<cl_uint>(-1);
cl_uint param_value = static_cast<cl_uint>(-1);

result = clGetAcceleratorInfoINTEL(
accelerator,
CL_ACCELERATOR_REFERENCE_COUNT_INTEL,
sizeof(cl_uint) + 1,
reinterpret_cast<void *>(&parm_value),
&param_value,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
EXPECT_EQ(sizeof(cl_uint), param_value_size_ret);
EXPECT_EQ(1u, parm_value);
EXPECT_EQ(1u, param_value);
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCountWithShortReturnExpectFail) {
cl_uint parm_value = static_cast<cl_uint>(-1);
cl_uint param_value = static_cast<cl_uint>(-1);

result = clGetAcceleratorInfoINTEL(
accelerator,
CL_ACCELERATOR_REFERENCE_COUNT_INTEL,
sizeof(cl_uint) - 1,
reinterpret_cast<void *>(&parm_value),
&param_value,
&param_value_size_ret);

EXPECT_EQ(CL_INVALID_VALUE, result);
Expand All @@ -215,7 +215,7 @@ TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCountSizeQueryExpectPass) {
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCount2ExpectPass) {
cl_uint parm_value = static_cast<cl_uint>(-1);
cl_uint param_value = static_cast<cl_uint>(-1);

result = clRetainAcceleratorINTEL(accelerator);
ASSERT_EQ(CL_SUCCESS, result);
Expand All @@ -224,11 +224,11 @@ TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCount2ExpectPass) {
accelerator,
CL_ACCELERATOR_REFERENCE_COUNT_INTEL,
sizeof(cl_uint),
reinterpret_cast<void *>(&parm_value),
&param_value,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
EXPECT_EQ(2u, parm_value);
EXPECT_EQ(2u, param_value);

result = clReleaseAcceleratorINTEL(accelerator);

Expand All @@ -238,11 +238,11 @@ TEST_F(IntelAcceleratorGetInfoTest, GetInfoReferenceCount2ExpectPass) {
accelerator,
CL_ACCELERATOR_REFERENCE_COUNT_INTEL,
sizeof(cl_uint),
reinterpret_cast<void *>(&parm_value),
&param_value,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
EXPECT_EQ(1u, parm_value);
EXPECT_EQ(1u, param_value);
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoContextNullReturnExpectPass) {
Expand All @@ -258,44 +258,44 @@ TEST_F(IntelAcceleratorGetInfoTest, GetInfoContextNullReturnExpectPass) {
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoContextLongExpectPass) {
cl_context parm_value = reinterpret_cast<cl_context>(-1);
cl_context param_value = reinterpret_cast<cl_context>(-1);

result = clGetAcceleratorInfoINTEL(
accelerator,
CL_ACCELERATOR_CONTEXT_INTEL,
sizeof(cl_context) + 1,
reinterpret_cast<void *>(&parm_value),
&param_value,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
EXPECT_EQ(sizeof(cl_context), param_value_size_ret);
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoContextLongExpectRightContext) {
cl_context parm_value = reinterpret_cast<cl_context>(-1);
cl_context param_value = reinterpret_cast<cl_context>(-1);

result = clGetAcceleratorInfoINTEL(
accelerator,
CL_ACCELERATOR_CONTEXT_INTEL,
sizeof(cl_context),
reinterpret_cast<void *>(&parm_value),
&param_value,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
EXPECT_EQ(sizeof(cl_context), param_value_size_ret);

cl_context referenceContext = static_cast<cl_context>(pContext);
EXPECT_EQ(referenceContext, parm_value);
EXPECT_EQ(referenceContext, param_value);
}

TEST_F(IntelAcceleratorGetInfoTest, GetInfoContextShortExpectPass) {
cl_context parm_value = reinterpret_cast<cl_context>(-1);
cl_context param_value = reinterpret_cast<cl_context>(-1);

result = clGetAcceleratorInfoINTEL(
accelerator,
CL_ACCELERATOR_CONTEXT_INTEL,
sizeof(cl_context) - 1,
reinterpret_cast<void *>(&parm_value),
&param_value,
&param_value_size_ret);

EXPECT_EQ(CL_INVALID_VALUE, result);
Expand Down
18 changes: 9 additions & 9 deletions unit_tests/api/cl_intel_motion_estimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoDescriptorExactExpectPass) {
accelerator,
CL_ACCELERATOR_DESCRIPTOR_INTEL,
sizeof(cl_motion_estimation_desc_intel), // exact
reinterpret_cast<void *>(&descReturn),
&descReturn,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
Expand All @@ -264,7 +264,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoDescriptorShortExpectFail) {
accelerator,
CL_ACCELERATOR_DESCRIPTOR_INTEL,
sizeof(cl_motion_estimation_desc_intel) - 1, // short
reinterpret_cast<void *>(&descReturn),
&descReturn,
&param_value_size_ret);

EXPECT_EQ(CL_INVALID_VALUE, result);
Expand All @@ -276,7 +276,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoDescriptorVeryShortExpectFail) {
accelerator,
CL_ACCELERATOR_DESCRIPTOR_INTEL,
0, // very short
reinterpret_cast<void *>(&descReturn),
&descReturn,
&param_value_size_ret);

EXPECT_EQ(CL_INVALID_VALUE, result);
Expand All @@ -288,7 +288,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoDescriptorLongExpectPass) {
accelerator,
CL_ACCELERATOR_DESCRIPTOR_INTEL,
sizeof(cl_motion_estimation_desc_intel) + 1, // long
reinterpret_cast<void *>(&descReturn),
&descReturn,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
Expand All @@ -314,7 +314,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoTypeExpectPass) {
accelerator,
CL_ACCELERATOR_TYPE_INTEL,
sizeof(cl_uint),
reinterpret_cast<void *>(&type_returned),
&type_returned,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
Expand All @@ -328,7 +328,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoTypeExactExpectPass) {
accelerator,
CL_ACCELERATOR_TYPE_INTEL,
sizeof(cl_uint), // exact
reinterpret_cast<void *>(&type_returned),
&type_returned,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
Expand All @@ -342,7 +342,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoTypeShortExpectFail) {
accelerator,
CL_ACCELERATOR_TYPE_INTEL,
sizeof(cl_uint) - 1, // short
reinterpret_cast<void *>(&type_returned),
&type_returned,
&param_value_size_ret);

EXPECT_EQ(CL_INVALID_VALUE, result);
Expand All @@ -354,7 +354,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoTypeVeryShortExpectFail) {
accelerator,
CL_ACCELERATOR_TYPE_INTEL,
0, // very short
reinterpret_cast<void *>(&type_returned),
&type_returned,
&param_value_size_ret);

EXPECT_EQ(CL_INVALID_VALUE, result);
Expand All @@ -366,7 +366,7 @@ TEST_F(IntelMotionEstimationGetInfoTest, getInfoTypeLongExpectPass) {
accelerator,
CL_ACCELERATOR_TYPE_INTEL,
sizeof(cl_uint) + 1, // long
reinterpret_cast<void *>(&type_returned),
&type_returned,
&param_value_size_ret);

EXPECT_EQ(CL_SUCCESS, result);
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/aub_mem_dump/lrca_helper_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TEST(LrcaHelper, WhenLrcaHelperIsInitializedThenLrcaIncludesDebugModeLri) {

auto lrcaBufferSize = helper.sizeLRCA / sizeof(uint32_t);
auto lrca = std::unique_ptr<uint32_t[]>(new uint32_t[lrcaBufferSize]);
helper.initialize(reinterpret_cast<void *>(lrca.get()));
helper.initialize(lrca.get());

bool debugModeLriFound = false;
for (uint32_t i = 0; i < lrcaBufferSize; i += 2) {
Expand Down
6 changes: 3 additions & 3 deletions unit_tests/event/async_events_handler_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ TEST_F(AsyncEventsHandlerTests, givenEventsNotHandledByHandlderWhenAsyncExecutio
EXPECT_EQ(3, event1->getRefInternalCount());
EXPECT_EQ(3, event2->getRefInternalCount());
handler->allowAsyncProcess.store(false);
MockHandler::asyncProcess(reinterpret_cast<void *>(handler.get())); // enter and exit because of allowAsyncProcess == false
MockHandler::asyncProcess(handler.get()); // enter and exit because of allowAsyncProcess == false
EXPECT_EQ(2, event1->getRefInternalCount());
EXPECT_EQ(2, event2->getRefInternalCount());
EXPECT_TRUE(handler->peekIsListEmpty());
Expand Down Expand Up @@ -349,7 +349,7 @@ TEST_F(AsyncEventsHandlerTests, givenSleepCandidateWhenProcessedThenCallWaitWith

EXPECT_CALL(*event1, wait(true, true)).Times(1).WillOnce(Invoke(unsetAsyncFlag));

MockHandler::asyncProcess(reinterpret_cast<void *>(handler.get()));
MockHandler::asyncProcess(handler.get());

event1->setStatus(CL_COMPLETE);
}
Expand All @@ -360,7 +360,7 @@ TEST_F(AsyncEventsHandlerTests, asyncProcessCallsProcessListBeforeReturning) {
handler->registerEvent(event);
handler->allowAsyncProcess.store(false);

MockHandler::asyncProcess(reinterpret_cast<void *>(handler.get()));
MockHandler::asyncProcess(handler.get());
EXPECT_TRUE(handler->peekIsListEmpty());
EXPECT_EQ(1, event->getRefInternalCount());

Expand Down
2 changes: 1 addition & 1 deletion unit_tests/sampler/sampler_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ TEST(castToSamplerTest, GivenGenericPointerWhichHoldsSamplerObjectWhenCastToSamp
TEST(castToSamplerTest, GivenGenericPointerWhichDoestNotHoldSamplerObjectWhenCastToSamplerIsCalledThenCastWithAFailure) {
auto context = std::make_unique<MockContext>();
auto notSamplerObj = std::unique_ptr<Image>(ImageHelper<Image2dDefaults>::create(context.get()));
auto ptr = reinterpret_cast<void *>(notSamplerObj.get());
void *ptr = notSamplerObj.get();
auto notSampler = castToObject<Sampler>(ptr);

EXPECT_EQ(nullptr, notSampler);
Expand Down

0 comments on commit e8a7113

Please sign in to comment.