Lines Matching refs:subresourceRange
502 uint32_t Image::getLastLayerIndex(const VkImageSubresourceRange& subresourceRange) const in getLastLayerIndex()
504 return ((subresourceRange.layerCount == VK_REMAINING_ARRAY_LAYERS) ? in getLastLayerIndex()
505 arrayLayers : (subresourceRange.baseArrayLayer + subresourceRange.layerCount)) - 1; in getLastLayerIndex()
508 uint32_t Image::getLastMipLevel(const VkImageSubresourceRange& subresourceRange) const in getLastMipLevel()
510 return ((subresourceRange.levelCount == VK_REMAINING_MIP_LEVELS) ? in getLastMipLevel()
511 mipLevels : (subresourceRange.baseMipLevel + subresourceRange.levelCount)) - 1; in getLastMipLevel()
514 void Image::clear(void* pixelData, VkFormat format, const VkImageSubresourceRange& subresourceRange… in clear() argument
516 uint32_t firstLayer = subresourceRange.baseArrayLayer; in clear()
517 uint32_t lastLayer = getLastLayerIndex(subresourceRange); in clear()
520 uint32_t lastLevel = getLastMipLevel(subresourceRange); in clear()
521 for(uint32_t mipLevel = subresourceRange.baseMipLevel; mipLevel <= lastLevel; ++mipLevel) in clear()
535 … format, const VkRect2D& renderArea, const VkImageSubresourceRange& subresourceRange, VkImageAspec… in clear() argument
537 if((subresourceRange.baseMipLevel != 0) || in clear()
538 (subresourceRange.levelCount != 1)) in clear()
547 uint32_t firstLayer = subresourceRange.baseArrayLayer; in clear()
548 uint32_t lastLayer = getLastLayerIndex(subresourceRange); in clear()
561 void Image::clear(const VkClearColorValue& color, const VkImageSubresourceRange& subresourceRange) in clear() argument
563 if(!(subresourceRange.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT)) in clear()
568 clear((void*)color.float32, getClearFormat(), subresourceRange, VK_IMAGE_ASPECT_COLOR_BIT); in clear()
571 …mage::clear(const VkClearDepthStencilValue& color, const VkImageSubresourceRange& subresourceRange) in clear() argument
573 if((subresourceRange.aspectMask & ~(VK_IMAGE_ASPECT_DEPTH_BIT | in clear()
579 if(subresourceRange.aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) in clear()
581 clear((void*)(&color.depth), VK_FORMAT_D32_SFLOAT, subresourceRange, VK_IMAGE_ASPECT_DEPTH_BIT); in clear()
584 if(subresourceRange.aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) in clear()
586 clear((void*)(&color.stencil), VK_FORMAT_S8_UINT, subresourceRange, VK_IMAGE_ASPECT_STENCIL_BIT); in clear()
590 …learValue& clearValue, const VkRect2D& renderArea, const VkImageSubresourceRange& subresourceRange) in clear() argument
592 if(!((subresourceRange.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT) || in clear()
593 (subresourceRange.aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | in clear()
595 (subresourceRange.baseMipLevel != 0) || in clear()
596 (subresourceRange.levelCount != 1)) in clear()
601 if(subresourceRange.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT) in clear()
603 …clear((void*)(clearValue.color.float32), getClearFormat(), renderArea, subresourceRange, VK_IMAGE_… in clear()
607 if(subresourceRange.aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) in clear()
609 …(&clearValue.depthStencil.depth), VK_FORMAT_D32_SFLOAT, renderArea, subresourceRange, VK_IMAGE_ASP… in clear()
612 if(subresourceRange.aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) in clear()
614 …clear((void*)(&clearValue.depthStencil.stencil), VK_FORMAT_S8_UINT, renderArea, subresourceRange, … in clear()