mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
[1/n] Mipmap support
* adding support for map/unmap * adding support for origin/region validation with mipmaps * fixing slices returned in map/unmap * removing ambiguity around mipLevel naming * enabling cl_khr_mipmap_image in current shape * enabling cl_khr_mipmap_image_writes in current shape * fixing CompileProgramWithReraFlag test Change-Id: I0c9d83028c5c376f638e45151755fd2c7d0fb0ab
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "runtime/context/context.h"
|
||||
#include "runtime/event/event_builder.h"
|
||||
#include "runtime/helpers/get_info.h"
|
||||
#include "runtime/helpers/mipmap.h"
|
||||
#include "runtime/mem_obj/buffer.h"
|
||||
#include "runtime/mem_obj/image.h"
|
||||
|
||||
@@ -41,10 +42,10 @@ void *CommandQueue::cpuDataTransferHandler(TransferProperties &transferPropertie
|
||||
|
||||
if (mapOperation) {
|
||||
returnPtr = ptrOffset(transferProperties.memObj->getCpuAddressForMapping(),
|
||||
transferProperties.memObj->calculateOffsetForMapping(transferProperties.offset));
|
||||
transferProperties.memObj->calculateOffsetForMapping(transferProperties.offset) + transferProperties.mipPtrOffset);
|
||||
|
||||
if (!transferProperties.memObj->addMappedPtr(returnPtr, transferProperties.memObj->calculateMappedPtrLength(transferProperties.size),
|
||||
transferProperties.mapFlags, transferProperties.size, transferProperties.offset)) {
|
||||
transferProperties.mapFlags, transferProperties.size, transferProperties.offset, transferProperties.mipLevel)) {
|
||||
err.set(CL_INVALID_OPERATION);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -115,6 +116,7 @@ void *CommandQueue::cpuDataTransferHandler(TransferProperties &transferPropertie
|
||||
outEventObj->setStartTimeStamp();
|
||||
}
|
||||
|
||||
UNRECOVERABLE_IF((transferProperties.memObj->isMemObjZeroCopy() == false) && isMipMapped(transferProperties.memObj));
|
||||
switch (transferProperties.cmdType) {
|
||||
case CL_COMMAND_MAP_BUFFER:
|
||||
if (!transferProperties.memObj->isMemObjZeroCopy()) {
|
||||
|
||||
Reference in New Issue
Block a user