added cube/cube array support at VKImageView.cpp
This commit is contained in:
parent
556f3a08a2
commit
967f03992f
@ -1 +1 @@
|
||||
Subproject commit 7c8a5888a72d091e6bf6192226dec16d84d50245
|
||||
Subproject commit 26a383ee11a8f49b87ab7999110e3b9539202d37
|
@ -171,6 +171,9 @@ public: //Texture
|
||||
Texture2D *CreateTexture2D(TextureData *);
|
||||
Texture2D *CreateTexture2D(TextureCreateInfo *ci);
|
||||
|
||||
TextureCube *CreateTextureCube(TextureData *);
|
||||
TextureCube *CreateTextureCube(TextureCreateInfo *ci);
|
||||
|
||||
void Clear(TextureCreateInfo *);
|
||||
|
||||
bool ChangeTexture2D(Texture2D *,GPUBuffer *buf,const List<Image2DRegion> &, VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
|
||||
|
@ -116,7 +116,8 @@ SET(VK_MEMORY_SOURCE ${SG_INCLUDE_PATH}/VKMemory.h
|
||||
SET(VK_DEVICE_TEXTURE_SOURCE Vulkan/Texture/BufferImageCopy2D.h
|
||||
Vulkan/Texture/GenMipmaps2D.cpp
|
||||
Vulkan/Texture/VKDeviceTexture.cpp
|
||||
Vulkan/Texture/VKDeviceTexture2D.cpp)
|
||||
Vulkan/Texture/VKDeviceTexture2D.cpp
|
||||
Vulkan/Texture/VKDeviceTextureCube.cpp)
|
||||
|
||||
SET(VK_TEXTURE_LOADER_SOURCE ${SG_INCLUDE_PATH}/VKTextureCreateInfo.h
|
||||
Vulkan/Texture/VKTextureLoader.h
|
||||
|
@ -17,7 +17,15 @@ ImageView *CreateImageView(VkDevice device,VkImageViewType type,VkFormat format,
|
||||
iv_createinfo.subresourceRange.baseMipLevel =0;
|
||||
iv_createinfo.subresourceRange.levelCount =miplevel;
|
||||
iv_createinfo.subresourceRange.baseArrayLayer =0;
|
||||
iv_createinfo.subresourceRange.layerCount =ext.depth;
|
||||
|
||||
if(type==VK_IMAGE_VIEW_TYPE_CUBE)
|
||||
iv_createinfo.subresourceRange.layerCount =6;
|
||||
else
|
||||
if(type==VK_IMAGE_VIEW_TYPE_CUBE_ARRAY)
|
||||
iv_createinfo.subresourceRange.layerCount =6*ext.depth;
|
||||
else
|
||||
iv_createinfo.subresourceRange.layerCount =ext.depth;
|
||||
|
||||
|
||||
if(aspectMask&VK_IMAGE_ASPECT_DEPTH_BIT)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user