summaryrefslogtreecommitdiff
path: root/appendices/VK_EXT_robustness2.adoc
blob: 77b1e1d73961046fcebe8625583491ab4629a585 (plain)
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
// Copyright 2019-2023 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_EXT_robustness2.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
    2020-01-29
*IP Status*::
    No known IP claims.
*Contributors*::
  - Liam Middlebrook, NVIDIA
  - Jeff Bolz, NVIDIA

=== Description

This extension adds stricter requirements for how out of bounds reads and
writes are handled.
Most accesses must: be tightly bounds-checked, out of bounds writes must: be
discarded, out of bound reads must: return zero.
Rather than allowing multiple possible [eq]#(0,0,0,x)# vectors, the out of
bounds values are treated as zero, and then missing components are inserted
based on the format as described in <<textures-conversion-to-rgba,
Conversion to RGBA>> and <<fxvertex-input-extraction,vertex input attribute
extraction>>.

These additional requirements may: be expensive on some implementations, and
should only be enabled when truly necessary.

This extension also adds support for "`null descriptors`", where
dlink:VK_NULL_HANDLE can: be used instead of a valid handle.
Accesses to null descriptors have well-defined behavior, and do not rely on
robustness.

include::{generated}/interfaces/VK_EXT_robustness2.adoc[]

=== Issues

1. Why do
   slink:VkPhysicalDeviceRobustness2PropertiesEXT::pname:robustUniformBufferAccessSizeAlignment
   and
   slink:VkPhysicalDeviceRobustness2PropertiesEXT::pname:robustStorageBufferAccessSizeAlignment
   exist?

*RESOLVED*: Some implementations cannot efficiently tightly bounds-check all
buffer accesses.
Rather, the size of the bound range is padded to some power of two multiple,
up to 256 bytes for uniform buffers and up to 4 bytes for storage buffers,
and that padded size is bounds-checked.
This is sufficient to implement D3D-like behavior, because D3D only allows
binding whole uniform buffers or ranges that are a multiple of 256 bytes,
and D3D raw and structured buffers only support 32-bit accesses.

=== Examples

None.

=== Version History

  * Revision 1, 2019-11-01 (Jeff Bolz, Liam Middlebrook)
  ** Initial draft