Граф коммитов

3152 Коммитов

Автор SHA1 Сообщение Дата
Xiang Li 81eb9808ce
Check wave sensitive on operand of gradient ops instead of gradient ops. (#3489)
* Check wave sensitive on operand of gradient ops instead of gradient ops.
2021-02-22 22:37:52 -08:00
Greg Roth 8fb57e7e27
Add barycentric shader flag when used (#3491)
A Dxil shader flag should be added when SV_Barycentrics semantic or
AttributeAtVertex() are used. It was defined and member variables
created for it, but it wasn't actually set.
2021-02-22 21:26:34 -08:00
Greg Roth 5a6cd583d0
Enable exec tests for 6.2 that warp supports (#3490)
At some point, these tests were disabled because they didn't run on
WARP. They do now, so I'm enabling them.

Additionally, tests that depend on 6.3 don't need to hide behind a lower
priority, they should be conditional on the availability of shader model
6.3. They still don't run on WARP since it doesn't support 6.3, but they
should run where that support is reported.
2021-02-22 17:28:29 -08:00
Adam Yang 0d0d6e4b86
Fixed entry point string being empty when the commandline didn't specify /E (#3477) 2021-02-22 16:54:30 -08:00
Greg Roth e2b32bc70b
Avoid trying to get disubprogram without debug MD (#3488)
When trying to fixup line numbers when inlining a function, if the call
instruction had no debug location, the DIsubprogram was queried. That
query took a very long time and was pointless when there is no debug
info.

The code now checks for debug metatdata before trying to get the
disubprogram

Fixes #3130
2021-02-22 16:41:51 -08:00
Greg Roth 72e46b3709
Fix crashing from null elements producing errors (#3487)
Under certain rare circumstances, it is possible for errors to be
reported for function or global variables that are null.

This eliminates the absolute necessity for a non-null function or GV by
passing in the context needed to report any error. It also avoids some
of the cases where trying to get a debug function would give a null
which would replace the non-null function.
2021-02-22 14:56:54 -08:00
Xiang Li 6f9a803bbe
Avoid cbuffer copy for special pattern. (#3483)
* Avoid cbuffer copy for special pattern.

float4 cb[16];
float v[64] = cb;
2021-02-22 12:46:14 -08:00
Justin Holewinski a3a88a169f
HelperLaneTestWave: Compile shaders for SM 6.6 when testing SM 6.6 (#3482) 2021-02-22 08:21:52 -05:00
Jaebaek Seo f913bde7d0
[spirv] support optional use of base vertex instance (#3478)
In DX12, `SV_InstanceID` always counts from 0. On the other hand,
Vulkan `gl_InstanceIndex` starts from the first instance. Thus it
doesn't emulate actual DX12 shader behavior. To make it equivalent,
we can set `SV_InstanceID = gl_InstanceIndex - gl_BaseInstance`.
However, it can break the existing working shaders (i.e., compatibility
issue). We want to provide an option for users to choose what they
exactly want by `SV_InstanceID`. This commit adds
`-fvk-support-nonzero-base-instance` option. If it is enabled, it emits
`SV_InstanceID = gl_InstanceIndex - gl_BaseInstance`. Otherwise,
`SV_InstanceID = gl_InstanceIndex`.
2021-02-19 14:30:39 -05:00
Helena Kotas bd4ff8e8f2
Fix BarycentricsTest test (#3476)
The render target was unnecessary huge causing failures on Microsoft Basic Render Driver
(which supports Barycentrics in newer Windows versions).
2021-02-18 16:01:30 -08:00
Jaebaek Seo 5bdb83bd4a
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#3450) 2021-02-18 17:48:27 -05:00
Adam Yang 98ddd699de
Added shader reflection part to source-only PDB. (#3467) 2021-02-18 13:32:13 -08:00
Vishal Sharma 3126c41892
Fix handling of [RW]ByteAddressBuffer load involving matrix type (#3469) 2021-02-18 11:14:47 -08:00
Jaebaek Seo cff993e0f8
[spirv] do not accept variable for OpImage* Offset (#3456)
The new spirv-val rule reports an error if we use a variable (not
OpConst*) for OpImage* Offset:
https://github.com/KhronosGroup/SPIRV-Tools/pull/4118

This CL also let the DXC SPIR-V backend report an error if it checks
the HLSL code uses a variable for the `offset` operand of `Sample*`
built-in methods.

It aligns with the DXIL or FXC behavior. They do not accept a variable
for the `offset` operand of `Sample*` built-in methods.
2021-02-18 10:43:16 -05:00
Greg Roth 650db999f9
Check for basic adaptor for unsupported warp test (#3471)
The warp check doesn't always catch situations where warp is in use.
This modifies it to include all the cases by comparing the adapter as
well.
2021-02-17 14:50:16 -08:00
Jaebaek Seo 2843f22825
[spirv] remove groupshared from tests with PS (#3474)
`groupshared` variables must not be used in pixel shaders.
This commit removes groupshared variables from unit tests with PS.
2021-02-17 16:02:14 -05:00
Greg Roth 354329a285
Correct disasm printing of sized tex2dms (#3473)
The code meant to add an integer to the string indicating the dimension
of the resource binding didn't convert it to a string resulting in a
corrupted string.

Adds a test as well

Fixed #3335
2021-02-17 14:01:01 -07:00
Vishal Sharma 88a9842639
Update append/consume test (#3468) 2021-02-16 18:16:21 -08:00
Vishal Sharma e2116a0eeb
Fix issues with matrix (append|consume) for (Append|Consume)StructuredBuffer (#3460) 2021-02-16 13:55:27 -08:00
Helena Kotas e2e2636930
Update version to 1.6.2102 (#3466) 2021-02-16 12:55:00 -08:00
Vishal Sharma 93a20f7967
Load remainder buffer elements in the end (#3462) 2021-02-16 12:36:32 -08:00
Jeff Noyle 4c998a5e7e
Fix (#3445)
Co-authored-by: Jeff Noyle <jeffno@ntdev.microsoft.com>
2021-02-16 09:13:13 -08:00
Xiang Li 53ff86a118
Fix assert when use glc resource as call arg. (#3459)
* Fix assert when use glc resource as call arg.
2021-02-13 14:15:17 -08:00
Sean Baxter 067f9d912d
Update HLMatrixType.cpp (#3415)
Calling getName() on a literal StructType will assert/segfault. Must check StructType::isLiteral first.
2021-02-12 20:16:53 -08:00
Xiang Li 11d32dc581
Collect resource property for temp arg resource like call(conde?sampler0:sampler1). (#3458) 2021-02-12 14:19:43 -08:00
Vishal Sharma 99f28fc529
Fix issues with structured buffer load lowering (#3454) 2021-02-12 11:42:34 -08:00
Greg Roth 0d026f8c67
Fix bad test cast/ fix 32-bit platform problems (#3451)
A change to silence warnings mistakenly cast a 64-bit value down to
32-bit. This corrects the cast.

Replaces instances where size_t usage may result in incorrect results on
32-bit systems plus one where it wouldn't for consistency.
2021-02-12 10:43:28 -08:00
Vishal Sharma 1c45fe61f5
Fix handling of matrix in StoreVertexOutput (#3441) 2021-02-12 10:41:15 -08:00
Adam Yang f5f4b1aa35
Made nested unroll work. (#3436) 2021-02-11 13:51:52 -08:00
Adam Yang 38e4ec9593
Added an internal interface to set a compiler on PdbUtils. (#3452) 2021-02-11 12:39:37 -08:00
Adam Yang 83cf9a1511
Initialized the commitsha string ref with an empty string rather than leaving it null (#3453) 2021-02-10 19:39:16 -08:00
Justin Holewinski f3c899bdde
Fix AS/MS/PS interaction for AtomicsFloatTest (#3447)
The AS/MS shader stages were overwriting each other's groupshared output,
and were not using the expected per-thread index when offsetting into
buffers and groupshared memory. Instead, follow the pattern of
AtomicsTest and use the payload data to convey groupshared data between
AS and MS, and use unique ranges of per-thread indices for each stage.
2021-02-10 15:43:35 -08:00
Greg Roth 8bd86aed91
correct quad2D compute samp test result count (#3446)
While the tests were not accounting for the z coord, the number of
expected results was, leading to an attempt to verify uninitiatized
values. These uninitialized values failed to match the expected results
in all but the most infinitescimally improbable cases
2021-02-10 15:25:39 -08:00
Jeff Noyle ade0e24792
PIX: Shader debug: don't instrument ray query handles (#3434)
* checkpoint

* Move helper to new file

Co-authored-by: Jeff Noyle <jeffno@ntdev.microsoft.com>
2021-02-10 13:35:06 -08:00
Tex Riddell 694e5657c3
DxilConv: Fix interface translation regression (uses space != 0) (#3437) 2021-02-08 19:01:06 -08:00
Frank de Jong 02e8662de6
[spirv] Added support for [[vk::shader_record_ext]] (#3426)
I added support for the Shader Record buffer for the Khronos extension.
The code is adapted from [this](https://github.com/microsoft/DirectXShaderCompiler/pull/2179) previous merge.

It should fix this issue #3177
2021-02-08 11:22:51 -05:00
Alex Paige bae509a7c5
Fixes for RWBuffer/groupshared to have right Format and StructureByte… (#3433)
Having the format not set correctly was causing issues in striding and causing the float atomics test to fail.
2021-02-05 15:11:55 -08:00
Helena Kotas 63fcca6356
Fix crash in WaveSizeTest on GPUs with more then one wave size options (#3431) 2021-02-04 17:15:53 -08:00
Greg Roth f069cc9649
Add 2D quads to ComputeSample test (#3420)
Change test to represent both 1D and 2D quad layout options
2021-02-04 11:58:16 -08:00
Adam Yang be5635eaa6
Fixed some ConstantBuffer crashes. (#3427) 2021-02-03 12:05:53 -08:00
Helena Kotas 6e4e1f8b93
Enable and fix warnings on execution tests (#3424)
* Move warning enabling pragma to cpp files before includes and fixed warning that popped up
Whitespace change in ShaderOpArithTable.xml

* Enable and fix warnings on execution tests

* One more warning
2021-02-03 11:46:10 -08:00
Vishal Sharma 23a94db422
Handle matrix type when expanding store intrinsics (#3418) 2021-02-03 09:13:04 -08:00
Vishal Sharma 991205e511
Fix a bug in buffer store when storing matrix of size greater than four (#3422) 2021-02-02 19:40:59 -08:00
Helena Kotas f56d2aff87
Lower the priority of HelperLaneTestWave (#3425) 2021-02-01 19:35:32 -08:00
Adam Yang 6cd93dfe40
Added option to not generate nops (#3419) 2021-02-01 15:57:53 -08:00
Adam Yang 01135442bb
Fixed the parameter for QuadReadLaneAt incorrectly being const (#3421) 2021-02-01 15:44:12 -08:00
Xiang Li 81af620244
Fix bug when lower NonUniformResourceIndex. (#3417)
Should only mark nonUniform on user of CI.
2021-02-01 12:02:05 -08:00
Minmin Gong 65155d95bd
In the original code, there are chances to compare an iterator from m_CBsByName to m_StructuredBufferCBsByName.end(). It crashes if _ITERATOR_DEBUG_LEVEL is not 0. Fix it by comparing an iterator to the container it's from. (#3160)
Co-authored-by: Minmin Gong <mgong@microsoft.com>
2021-01-29 14:31:52 -08:00
Tex Riddell de63c27429
Re-enable IsHelperLane test since down-conversion is in (#3410) 2021-01-29 13:14:17 -08:00
Tex Riddell 3b99af518d
Implement fallback path for IsHelper on SM < 6.6 (#3408) 2021-01-29 11:05:05 -08:00