The wave sensitivity analysis should produce a result for any relevant
instruction. It fails in some cases, which is a bug. However, the result
of that bug shouldn't be intermittent incorrect errors as it is now.
When a result isn't found, assume that there is no wave sensitivity. The
assert is kept and might produce a warning ultimately. This is meant to
add a guard rail to the worst case scenario.
The code `int foo; .. size(float) * foo` causes failure because
`getElementSpirvBitwidth()` in AstTypeProbe.cpp does not handle the type
of `sizeof()` which is the "unsigned long" type. This commit handles it.
Fixes#2814
Future work would be confused by current meaning of Set/GetHandle
on DxilResourceBase, which didn't make sense anyway for this narrow
use case limited to DxilConv.
This change replaces that use with a local handle Value* cache keyed off
of the resource class and slot.
This is valid only for SM 5.0 and below, where the cache applies.
It can't be used generally for SM 5.1, which is an existing limitation,
so no change here.
The lifetime test had parameters for UAV creation in the wrong order so
they were misassigned. The use of lib creation also didn't depend on
raytracing support as it should.
correct some other sm66 cap bit checks too
Various resources have been created inconsistently with the shader
representation. After running out of bandaids, this refactors that code
to give the caller the tools necessary to create the resources
correctly.
Builtin object types such as Texture2D add all their object methods
to the associated decl context when they are first seen. However,
previously, if the code meant to effect that was found in a namespace
it would skip this addition. This removes that restriction so that
the methods can be added and then found when needed.
Fixes#2472
Previously, codegen attempted to skip the alloca creation that would
be encountered below and just emit the constant init. However, the
code in EmitAutoVarDecl() first checks whether the Init is null using
isTrivialInitializer() and just bails if it is.
This adds the isTrivialInitializer() call to the conditions here
since we fallback to the alloca if there is no constant initializer.
The ShaderOpTest code for mesh shaders had a lot of problems. This
corrects the initialization of the pipeline and the dispatch.
In addition, there were various problems with ExecutionTests for atomics
where mesh shaders were used. This adds testing for mesh results that
was being skipped. This required adjustment of the indices.
Also required was proper accumulation of groupshared values between
amplification and mesh shaders.
Various and sundry indexing corrections were also required.