Commit graph

14 commits

Author SHA1 Message Date
Nathan Gauër
fae70ec4ae validation: fix VUID-vkAllocateMemory 02790
Related to #876.
On AMD RX 5700 XT, heaps with MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD
are present. Because the heap selection doesn't break early, the code
ends up selecting one of the 'late' heaps, which contains more property
bits than required. Including this one which causes validation error.

Breaking early should solve this on all GPUs, as the Vulkan specs
specifies the order of heap declarations:
```
For each pair of elements X and Y returned in memoryTypes, X must be
placed at a lower index position than Y if:
    - the set of bit flags returned in the propertyFlags member of X is
      a strict subset of the set of bit flags returned in the
      propertyFlags member of Y;
```

So if my understanding is correct, by breaking early we should always
select the most basic heap that meets the sample needs.

Signed-off-by: Nathan Gauër <nathan@gauer.org>
2023-03-22 23:52:52 +01:00
Sascha Willems
d13b9a93bc Replaced outdated android layer names 2022-12-31 10:27:10 +01:00
Sascha Willems
e52a9342f4 Add command line arguments to headless samples
Those samples can now toggle between glsl and hlsl shaders
Moved command line parster to a separate header
2022-12-31 09:45:01 +01:00
Stephen Saunders
6ef16905ce Headless examples: update validation layer name & implement macOS VK_KHR_portability_subset / VK_KHR_portability_enumeration 2022-07-27 13:43:52 -04:00
jeromenxp
1b22456d07 Change scope of validationExt and validationLayerName variables
Pointer to a variable declared into a block statement is stored and used outside of the block by vkCreateInstance. This can lead to segmentation fault.
Move the declaration of validationExt/validationLayerName outside of the block to fix the crash.
2021-01-18 17:41:41 +01:00
Dejan Trajkovic
c201670b0e Correct shadersPath for computeheadless project 2020-06-07 17:26:11 +02:00
Ben Clayton
301e8abf12 Add command flag for picking between shaders
The new `-s`, `--shaders` command line flag allows you to specify whether you want to load the glsl or hlsl shaders.
Defaults to glsl.

Issue: #723
2020-06-01 12:22:28 +01:00
Ben Clayton
ca884587a4 Move shaders into glsl and hlsl directories
Move `data/shaders` to `data/shaders/glsl`
Move `data/hlsl` to `data/shaders/hlsl`

Fix up shader paths in the cpp files to point to the new glsl location.

`data/shaders/hlsl/compile.py` still overwrites the glsl .spv files (for
now).

Issue: #723
2020-06-01 12:22:28 +01:00
Sascha Willems
d1fbf8d00a
Skeletalanimation fix (#671)
* Fixed anc code cleanup for skeletal animation

Refs #669

* Fix android build
2020-02-20 14:25:29 +01:00
Sascha Willems
662d2b3464 Centralize asset path handling
Refs #470
Refs #627
2020-02-17 21:09:27 +01:00
saschawillems
79ac92bc3b Validation layer present check 2018-05-11 08:43:20 +02:00
saschawillems
be78fd0474 Removed deprecated app_dummy call 2018-05-11 08:31:26 +02:00
saschawillems
d46203b890 Clean validation, code comments 2018-01-28 14:16:29 +01:00
saschawillems
94a076e1ae Moved example source files into sub folder 2017-11-12 19:32:09 +01:00