mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Refactor GraphicsAllocation::AllocationType and allocationType enums
- change GraphicsAllocatoin::AllocationType to scoped enumeration so that ALLOCATION_TYPE_ prefix in every enum value can be removed - all accesses are typed (example AllocationType::IMAGE) - Rename allocationType to AllocationUsage to eliminate confusion with multiple AllocationType enums / types Change-Id: I16003297ecfcb0aaa5779ad00706c5d983914bbe
This commit is contained in:
committed by
sys_ocldev
parent
1c88165f6f
commit
684b1d75ba
@@ -363,10 +363,10 @@ TEST_P(NoHostPtr, withBufferGraphicsAllocationReportsBufferType) {
|
||||
|
||||
auto &allocation = *buffer->getGraphicsAllocation();
|
||||
auto type = allocation.getAllocationType();
|
||||
auto isTypeBuffer = !!(type & GraphicsAllocation::ALLOCATION_TYPE_BUFFER);
|
||||
auto isTypeBuffer = !!(type & GraphicsAllocation::AllocationType::BUFFER);
|
||||
EXPECT_TRUE(isTypeBuffer);
|
||||
|
||||
auto isTypeWritable = !!(type & GraphicsAllocation::ALLOCATION_TYPE_WRITABLE);
|
||||
auto isTypeWritable = !!(type & GraphicsAllocation::AllocationType::WRITABLE);
|
||||
auto isBufferWritable = !(flags & (CL_MEM_READ_ONLY | CL_MEM_HOST_READ_ONLY | CL_MEM_HOST_NO_ACCESS));
|
||||
EXPECT_EQ(isBufferWritable, isTypeWritable);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user