diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-03-21 12:06:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-21 12:06:29 -0400 |
| commit | 4e359e109d665490909ae4a1ca980b7d766c8eff (patch) | |
| tree | 241aa59d33e6d7b8caa62629766923c7ba103cae /tests/compute/textureSamplingTest.slang | |
| parent | 0e5b8ded11a2d425c2d3b2d5ed24ec6d8471ad87 (diff) | |
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.
Diffstat (limited to 'tests/compute/textureSamplingTest.slang')
| -rw-r--r-- | tests/compute/textureSamplingTest.slang | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/tests/compute/textureSamplingTest.slang b/tests/compute/textureSamplingTest.slang deleted file mode 100644 index 1aa267b89..000000000 --- a/tests/compute/textureSamplingTest.slang +++ /dev/null @@ -1,103 +0,0 @@ -//TEST(compute):COMPARE_RENDER_COMPUTE: -//TEST_INPUT: Texture1D(size=4, content = one) : dxbinding(0),glbinding(0) -//TEST_INPUT: Texture2D(size=4, content = one) : dxbinding(1),glbinding(1) -//TEST_INPUT: Texture3D(size=4, content = one) : dxbinding(2),glbinding(2) -//TEST_INPUT: TextureCube(size=4, content = one) : dxbinding(3),glbinding(3) -//TEST_INPUT: Texture1D(size=4, content = one, arrayLength=2) : dxbinding(4),glbinding(4) -//TEST_INPUT: Texture2D(size=4, content = one, arrayLength=2) : dxbinding(5),glbinding(5) -//TEST_INPUT: TextureCube(size=4, content = one, arrayLength=2) : dxbinding(6),glbinding(6) -//TEST_INPUT: Sampler : dxbinding(0),glbinding(0,1,2,3,4,5,6) -//TEST_INPUT: ubuffer(data=[0], stride=4):dxbinding(1),glbinding(0),out - - -Texture1D t1D; -Texture2D t2D; -Texture3D t3D; -TextureCube tCube; -Texture1DArray t1dArray; -Texture2DArray t2dArray; -TextureCubeArray tCubeArray; -SamplerState samplerState; -RWStructuredBuffer<float> outputBuffer; - -cbuffer Uniforms -{ - float4x4 modelViewProjection; -} - -struct AssembledVertex -{ - float3 position; - float3 color; - float2 uv; -}; - -struct CoarseVertex -{ - float3 color; - float2 uv; -}; - -struct Fragment -{ - float4 color; -}; - - -// Vertex Shader - -struct VertexStageInput -{ - AssembledVertex assembledVertex : A; -}; - -struct VertexStageOutput -{ - CoarseVertex coarseVertex : CoarseVertex; - float4 sv_position : SV_Position; -}; - -VertexStageOutput vertexMain(VertexStageInput input) -{ - VertexStageOutput output; - - float3 position = input.assembledVertex.position; - float3 color = input.assembledVertex.color; - - output.coarseVertex.color = color; - output.sv_position = mul(modelViewProjection, float4(position, 1.0)); - output.coarseVertex.uv = input.assembledVertex.uv; - return output; -} - -// Fragment Shader - -struct FragmentStageInput -{ - CoarseVertex coarseVertex : CoarseVertex; -}; - -struct FragmentStageOutput -{ - Fragment fragment : SV_Target; -}; - -FragmentStageOutput fragmentMain(FragmentStageInput input) -{ - FragmentStageOutput output; - - float3 color = input.coarseVertex.color; - float2 uv = input.coarseVertex.uv; - output.fragment.color = float4(color, 1.0); - - float4 val = 0.0; - val += t1D.Sample(samplerState, uv.x); - val += t2D.Sample(samplerState, uv); - val += t3D.Sample (samplerState, float3(uv, 0.5)); - val += t1dArray.Sample(samplerState, float2(uv.x, 0.0)); - val += t2dArray.Sample(samplerState, float3(uv, 0.0)); - val += tCubeArray.Sample(samplerState, float4(uv, 0.5, 0.0)); - val += tCube.Sample(samplerState, float3(uv, 0.5)); - outputBuffer[0] = val.x; - return output; -}
\ No newline at end of file |
