diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-06-06 12:43:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-06 12:43:19 -0400 |
| commit | bbd6df7e5eb2c1d8811fbcd1ac37a86e2f9237bb (patch) | |
| tree | 3652b7180aa1e78e50389c2bd682d53627723df0 /tools/render-test/shader-input-layout.cpp | |
| parent | 688d5fa6eb2c7f5281e50ace1401737479911ebc (diff) | |
Fixed issue around 4xFloat16 texture on CUDA (#1874)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Fixes around Float16. Incorrect calculation of 'elementSize'.
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp index 3ab0366a5..11356a29a 100644 --- a/tools/render-test/shader-input-layout.cpp +++ b/tools/render-test/shader-input-layout.cpp @@ -928,7 +928,6 @@ namespace renderer_test { // TODO(JS): // Bool is here, because it's not clear across APIs how bool is laid out in memory - // Float16 is here as we don't have a convert Float16 to float function laying around default: case ScalarType::None: case ScalarType::Void: @@ -1180,10 +1179,10 @@ namespace renderer_test for (Index j = 0; j < pixelCount; ++j, srcPixels += 4, dstPixels += 4) { // Copy out rgba - dstPixels[0] = FloatToHalf(srcPixels[0] * 1.0f / 255); - dstPixels[1] = FloatToHalf(srcPixels[1] * 1.0f / 255); - dstPixels[2] = FloatToHalf(srcPixels[2] * 1.0f / 255); - dstPixels[3] = FloatToHalf(srcPixels[3] * 1.0f / 255); + dstPixels[0] = srcPixels[0] * (1.0f / 255); + dstPixels[1] = srcPixels[1] * (1.0f / 255); + dstPixels[2] = srcPixels[2] * (1.0f / 255); + dstPixels[3] = srcPixels[3] * (1.0f / 255); } break; } |
