Repository navigation
Run on GPUs without 16-bit shader types, name each backend's GPUs in the README, and set the version to 1.1 - #347
Merged
Conversation
…rsion 1.1 The shaders declared the primitives' and styles' 16-bit fields as half, int16_t and uint16_t. Vulkan then needed shaderFloat16 and shaderInt16, and Direct3D 12 native 16-bit operations, which GeForce GTX 900 and 10 and Radeon RX 400 and 500 don't have. The values were always widened to 32 bits before any math. - The shaders read those fields as the 32-bit words holding them and unpack them with 32-bit operations; on SPIR-V with UnpackHalf2x16, where Slang's f16tof32 goes through a half. The C++ data is unchanged and so is what's drawn. - Vulkan no longer requires shaderFloat16, shaderInt16, shaderInt8 or 8- and 16-bit storage; SDL GPU's device asks only for draw parameters. - Tests check that no SPIR-V declares a 16- or 8-bit capability and no DXIL asks for native 16-bit operations. - README: each platform's requirements stand alone, with the GPUs the default backend and the optional ones need, by name. - The version is 1.1.0.
…ader-types # Conflicts: # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The library now runs on GPUs without 16-bit shader types, which adds the GeForce GTX 900 and 10 series and the Radeon RX 400 and 500 series. The README now names the GPUs each backend needs, per platform. The version is 1.1.
What kept those GPUs out
half,int16_tanduint16_t, matching the packed C++ structs.shaderFloat16andshaderInt16.The change
Shaders (
all_common.slang): the 16-bit fields are read as the 32-bit words holding them, and unpacked with 32-bit operations, through small accessors such asColorStyle::TransformationX()andBox::SnappedPx().f16tof32goes through ahalfon SPIR-V. So on SPIR-V,UnpackHalf2uses SPIR-V's ownUnpackHalf2x16instruction instead.Vulkan (
GetDeviceRequirements): no longer requiresshaderFloat16,shaderInt16, or 16-bit storage. It also dropsshaderInt8and 8-bit storage, which no shader used.SDL GPU (
ApplyDeviceRequirements): asks only forshaderDrawParameters. The header anddocs/integration/sdlgpu-device.mdsay so.README requirements: each platform's section stands on its own, for readers who skip the others:
The GPU lists come from the Vulkan and Direct3D 12 hardware databases (vulkan.gpuinfo.org, d3d12infodb), checked feature by feature.
Version 1.1.0: in CMake, the package config's example, the README, the docs,
tests/package_consumerand the CHANGELOG.Checks
--bench 600gave 0.270 ms of GPU time per frame with both the old and the new shaders (Release, RTX 4070 Ti SUPER).built_in_resources_test.cpp): both failed on the old shaders.gui_core_testsgui_vulkan_tests,gui_d3d12_testsandgui_sdlgpu_testsgui_gpu_testson Vulkan, Direct3D 12 and SDL GPUNot tested
half, which every Metal GPU supports. CI builds it on macOS.