mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-20 13:11:34 +08:00
Pass renderCompressed information to GMM for 64kb allocations
Change-Id: I56302055c028e919bceeb3333557cab7451e1d09
This commit is contained in:

committed by
sys_ocldev

parent
8537c7f42f
commit
512978768e
@ -25,12 +25,14 @@
|
||||
#include "runtime/gmm_helper/resource_info.h"
|
||||
#include "runtime/helpers/aligned_memory.h"
|
||||
#include "runtime/helpers/debug_helpers.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/helpers/ptr_math.h"
|
||||
#include "runtime/helpers/surface_formats.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
|
||||
namespace OCLRT {
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) {
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(alignedPtr, alignedSize, uncacheable, false) {}
|
||||
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed) {
|
||||
resourceParams.Type = RESOURCE_BUFFER;
|
||||
resourceParams.Format = GMM_FORMAT_GENERIC_8BIT;
|
||||
resourceParams.BaseWidth = static_cast<uint32_t>(alignedSize);
|
||||
@ -55,7 +57,7 @@ Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) {
|
||||
resourceParams.Flags.Gpu.NoRestriction = 1;
|
||||
}
|
||||
|
||||
applyAuxFlagsForBuffer(false);
|
||||
applyAuxFlagsForBuffer(preferRenderCompressed);
|
||||
|
||||
gmmResourceInfo.reset(GmmResourceInfo::create(&resourceParams));
|
||||
}
|
||||
|
@ -21,11 +21,11 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "runtime/api/cl_types.h"
|
||||
#include "runtime/gmm_helper/gmm_lib.h"
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
#include "runtime/gmm_helper/gmm_lib.h"
|
||||
#include "runtime/api/cl_types.h"
|
||||
|
||||
namespace OCLRT {
|
||||
enum class OCLPlane;
|
||||
@ -39,6 +39,7 @@ class Gmm {
|
||||
Gmm() = delete;
|
||||
Gmm(ImageInfo &inputOutputImgInfo);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed);
|
||||
Gmm(GMM_RESOURCE_INFO *inputGmm);
|
||||
|
||||
void queryImageParams(ImageInfo &inputOutputImgInfo);
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "runtime/gmm_helper/gmm.h"
|
||||
#include "runtime/gmm_helper/resource_info.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/helpers/surface_formats.h"
|
||||
|
||||
|
Reference in New Issue
Block a user