P4 to Git Change 1131417 by gandryey@gera-w8 on 2015/03/17 10:31:57

ECR #304775 - Mipmaps support
	- Create views for the specified mip level in the transfer operations
	- OCL requires just one mip level transfer. Thus we could keep the original blit kernels and just create a view for the specified mip level.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#75 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#500 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#119 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#90 edit
This commit is contained in:
foreman
2015-03-17 10:53:04 -04:00
parent 65421eb202
commit f20ddcf1ce
3 changed files with 44 additions and 17 deletions
+19 -13
View File
@@ -490,12 +490,12 @@ public:
struct Impl
{
const amd::Coord3D region_; //!< Image size
size_t rp_; //!< Image row pitch
size_t sp_; //!< Image slice pitch
const Format format_; //!< Image format
void* reserved_;
size_t bp_;
amd::Coord3D region_; //!< Image size
size_t rp_; //!< Image row pitch
size_t sp_; //!< Image slice pitch
const Format format_; //!< Image format
void* reserved_;
size_t bp_;
Impl(const Format& format, Coord3D region, size_t rp, size_t sp = 0, size_t bp = 0)
: region_(region), rp_(rp), sp_(sp), format_(format), bp_(bp)
@@ -503,14 +503,16 @@ public:
};
private:
Impl impl_; //!< Image object description
size_t dim_; //!< Image dimension
uint mipLevels_; //!< The number of mip levels
Impl impl_; //!< Image object description
size_t dim_; //!< Image dimension
uint mipLevels_; //!< The number of mip levels
uint baseMipLevel_; //!< The base mip level for a view
protected:
Image(
const Format& format,
Image& parent);
Image& parent,
uint baseMipLevel = 0);
///! Initializes the device memory array which is nested
// after'Image' object in memory layout.
@@ -583,9 +585,10 @@ public:
//! Creates a view memory object
virtual Image* createView(
const Context& context, //!< Context for a view creation
const Format& format, //!< The new format for a view
device::VirtualDevice* vDev //!< Virtual device object
const Context& context, //!< Context for a view creation
const Format& format, //!< The new format for a view
device::VirtualDevice* vDev, //!< Virtual device object
uint baseMipLevel = 0 //!< Base mip level for a view
);
//! Returns the impl for this image.
@@ -617,6 +620,9 @@ public:
//! Returns image's slice pitch in bytes
uint getMipLevels() const { return mipLevels_; }
//! Returns image's slice pitch in bytes
uint getBaseMipLevel() const { return baseMipLevel_; }
//! Get the image covered region
const Coord3D& getRegion() const { return impl_.region_; }