diff options
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; |
