Firstly, support for the following SPIR-V extension in Vulkan is added:
SPV_AMD_texture_gather_bias_lodSecondly, the extension allows the application to query which formats can be used together with the new function prototypes introduced by the SPIR-V extension.
struct VkTextureLODGatherFormatPropertiesAMD
{
VkStructureType sType;
const void* pNext;
VkBool32 supportsTextureGatherLODBiasAMD;
};
// ----------------------------------------------------------------------------------------
// How to detect if an image format can be used with the new function prototypes.
VkPhysicalDeviceImageFormatInfo2 formatInfo;
VkImageFormatProperties2 formatProps;
VkTextureLODGatherFormatPropertiesAMD textureLODGatherSupport;
textureLODGatherSupport.sType = VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD;
textureLODGatherSupport.pNext = nullptr;
formatInfo.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2;
formatInfo.pNext = nullptr;
formatInfo.format = ...;
formatInfo.type = ...;
formatInfo.tiling = ...;
formatInfo.usage = ...;
formatInfo.flags = ...;
formatProps.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2;
formatProps.pNext = &textureLODGatherSupport;
vkGetPhysicalDeviceImageFormatProperties2(physical_device, &formatInfo, &formatProps);
if (textureLODGatherSupport.supportsTextureGatherLODBiasAMD == VK_TRUE)
{
// physical device supports SPV_AMD_texture_gather_bias_lod for the specified
// format configuration.
}
else
{
// physical device does not support SPV_AMD_texture_gather_bias_lod for the
// specified format configuration.
}
VK_AMD_texture_gather_bias_lodVK_KHR_get_physical_device_properties2SPV_AMD_texture_gather_bias_lodGL_AMD_texture_gather_bias_lod| Modifier and Type | Field and Description |
|---|---|
| public static final String | VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME
The extension name. |
| public static final int | VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION
The extension specification version. |
| public static final int | VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD
Extends |
| Access | Constructor and Description |
|---|---|
| private |
| VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME | back to summary |
|---|---|
| public static final String VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME The extension name. | |
| VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION | back to summary |
|---|---|
| public static final int VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION The extension specification version. | |
| VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD Extends | |
| AMDTextureGatherBiasLod | back to summary |
|---|---|
| private AMDTextureGatherBiasLod() | |