From 4e359e109d665490909ae4a1ca980b7d766c8eff Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 21 Mar 2019 12:06:29 -0400 Subject: Hotfix/dx12 tests use hardware (#920) * Disable Dx12 half tests. The half-calc test runs, but is not actually doing any half maths. If the code is changed such that it is, the device fails when the shader is used. This can be seen by looking at dxil-asm. * Fix using software driver for dx12 even when hardware is requested. * * Refactor Dx12 _createAdapter such that it doesn't have side effects and stores desc information * Disable half on dx12 software renderer because it crashes * * Disable erroneous warnings from dx12 * Test for adapter creation * Identify warp specifically * Structured buffer test now works on dx12. * Fix intemittent crash on dx12. Due to if a resource was initialized with data, the actual resource constructed might be larger, for alignment issues. This led to a memcpy potentially copying from after the allocated source data and therefore a crash. Now only copies the non aligned amount of data. * * Rename the test to use - style * Disable TextureCube lookup in tests, as does not produce the correct result in dx12 (will fix in future PR) * Updated hlsl.meta.slang.h that has rcp for glsl. --- source/slang/hlsl.meta.slang.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source') diff --git a/source/slang/hlsl.meta.slang.h b/source/slang/hlsl.meta.slang.h index e40e12962..b7bbc3985 100644 --- a/source/slang/hlsl.meta.slang.h +++ b/source/slang/hlsl.meta.slang.h @@ -1213,13 +1213,9 @@ SLANG_RAW("__generic\n") SLANG_RAW("__target_intrinsic(glsl, \"1.0/($0)\")\n") SLANG_RAW("T rcp(T x);\n") SLANG_RAW("\n") -SLANG_RAW("__generic\n") -SLANG_RAW("__target_intrinsic(glsl, \"1.0/($0)\")\n") -SLANG_RAW("vector rcp(vector x);\n") -SLANG_RAW("\n") -SLANG_RAW("__generic\n") -SLANG_RAW("__target_intrinsic(glsl, \"1.0/($0)\")\n") -SLANG_RAW("matrix rcp(matrix x);\n") +SLANG_RAW("// TODO: vector and matrix approx. reciprocals needto be deconstructed for GLSL\n") +SLANG_RAW("__generic vector rcp(vector x);\n") +SLANG_RAW("__generic matrix rcp(matrix x);\n") SLANG_RAW("\n") SLANG_RAW("// Reflect incident vector across plane with given normal\n") SLANG_RAW("__generic\n") @@ -1539,7 +1535,7 @@ for (int aa = 0; aa < kBaseBufferAccessLevelCount; ++aa) sb << "};\n"; } -SLANG_RAW("#line 1466 \"hlsl.meta.slang\"") +SLANG_RAW("#line 1462 \"hlsl.meta.slang\"") SLANG_RAW("\n") SLANG_RAW("\n") SLANG_RAW("\n") -- cgit v1.2.3