-
Notifications
You must be signed in to change notification settings - Fork 454
/
VK_AMD_texture_gather_bias_lod.txt
95 lines (73 loc) · 2.76 KB
/
VK_AMD_texture_gather_bias_lod.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Copyright (c) 2017-2020 Advanced Micro Devices, Inc.
//
// SPDX-License-Identifier: CC-BY-4.0
include::{generated}/meta/{refprefix}VK_AMD_texture_gather_bias_lod.txt[]
=== Other Extension Metadata
*Last Modified Date*::
2017-03-21
*IP Status*::
No known IP claims.
*Interactions and External Dependencies*::
- This extension requires
{spirv}/AMD/SPV_AMD_texture_gather_bias_lod.html[`SPV_AMD_texture_gather_bias_lod`]
- This extension provides API support for
{GLregistry}/AMD/AMD_texture_gather_bias_lod.txt[`GL_AMD_texture_gather_bias_lod`]
*Contributors*::
- Dominik Witczak, AMD
- Daniel Rakos, AMD
- Graham Sellers, AMD
- Matthaeus G. Chajdas, AMD
- Qun Lin, AMD
- Rex Xu, AMD
- Timothy Lottes, AMD
=== Description
This extension adds two related features.
Firstly, support for the following SPIR-V extension in Vulkan is added:
* `SPV_AMD_texture_gather_bias_lod`
Secondly, the extension allows the application to query which formats can be
used together with the new function prototypes introduced by the SPIR-V
extension.
include::{generated}/interfaces/VK_AMD_texture_gather_bias_lod.txt[]
=== New SPIR-V Capabilities
* <<spirvenv-capabilities-table-ImageGatherBiasLodAMD,
code:ImageGatherBiasLodAMD>>
=== Examples
[source,c++]
--------------------------------------
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.
}
--------------------------------------
=== Version History
* Revision 1, 2017-03-21 (Dominik Witczak)
- Initial draft