diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-05-06 12:45:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-06 12:45:00 -0400 |
| commit | e510a287deb25f2542a68bf21382f2557740d70c (patch) | |
| tree | a2bc079431edeeb979d61fa4612858f6aa13c901 /tools/gfx/cuda/render-cuda.cpp | |
| parent | 85632e8db19916a2f348fe356a91119d2fde2929 (diff) | |
Half texture support (#1836)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Split out StringEscapeUtil.
* Added StringEscapeUtil.
* Fix typo in unix quoting type.
* Small comment improvements.
* Try to fix linux linking issue.
* Fix typo.
* Attempt to fix linux link issue.
* Update VS proj even though nothing really changed.
* Fix another typo issue.
* Fix for windows issue.
Fixed bug.
* Make separate Utils for escaping.
* Fix typo.
* Split out into StringEscapeHandler.
* Windows shell does handle removing quotes (so remove code to remove them).
* Handle unescaping if not initiating using the shell.
* Slight improvement around shell like decoding.
* Simplify command extraction.
* Add shared-library category type.
* Fix bug in command extraction.
* Typo in transcendental category.
* Enable unit-test on in smoke test category.
* Make parsing failing output as a failing test.
* Fixes for transcendental tests. Disable tests that do not work.
* Changed category parsing.
* Removed the TestResult parameter from _gatherTestsForFile.
Made testsList only output.
* Remove testing if all tests were disabled.
* Make args of CommandLine always unescaped.
* Add category.
* Don't need escaping on unix/linux.
* Remove some no longer used functions.
* Add requireSMVersion to CUDAExtensionTracker.
* half-calc.slang now works for CUDA.
* bit-cast-16-bit works on CUDA.
* WIP handling of CUDA vector<half> types.
* Half swizzle CUDA.
* Half vector test.
* Fix swizzle half bug.
* Fix compilation issue with narrowing to Index.
* Add unary ops.
* Add some vector scalar maths ops.
* Add half vector conversions for CUDA.
* Fix erroneous comment.
* Support for half comparisons.
* First pass test for half compare.
* Fix bug in CUDA specialized emit control.
Updated tests to have pre and post inc/dec.
* Removed unneeded parts of the cuda prelude.
* Half structured buffer works on CUDA.
* Added name lookup for Gfx::Format
* Support half texture type in test system.
* Test for half reading on CUDA.
* Add half formats to Vk and D3D utils.
* Fix getAt for CUDA - where there might not be a .x member in a vector.
Diffstat (limited to 'tools/gfx/cuda/render-cuda.cpp')
| -rw-r--r-- | tools/gfx/cuda/render-cuda.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/gfx/cuda/render-cuda.cpp b/tools/gfx/cuda/render-cuda.cpp index a6400789f..b919ac6b0 100644 --- a/tools/gfx/cuda/render-cuda.cpp +++ b/tools/gfx/cuda/render-cuda.cpp @@ -1432,14 +1432,28 @@ public: switch (desc.format) { + case Format::RGBA_Float32: + case Format::RGB_Float32: + case Format::RG_Float32: case Format::R_Float32: case Format::D_Float32: { + const FormatInfo info = gfxGetFormatInfo(desc.format); format = CU_AD_FORMAT_FLOAT; - numChannels = 1; + numChannels = info.channelCount; elementSize = sizeof(float); break; } + case Format::RGBA_Float16: + case Format::RG_Float16: + case Format::R_Float16: + { + const FormatInfo info = gfxGetFormatInfo(desc.format); + format = CU_AD_FORMAT_HALF; + numChannels = info.channelCount; + elementSize = sizeof(uint16_t); + break; + } case Format::RGBA_Unorm_UInt8: { format = CU_AD_FORMAT_UNSIGNED_INT8; |
