You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disables various forms of scalarization and vector elimination to permit
vectors to pass through to final DXIL when used in native LLVM
operations and loading/storing.
Introduces a few vector manipulation llvm instructions to DXIL allowing
for them to appear in output DXIL.
Skips passes for 6.9 that scalarize, convert to arrays, or otherwise
eliminate vectors.
This eliminates the element-by-element extraction, application,
and reconstitution of the vectors to operators.
In many cases, this required plumbing the shader model information to
passes that didn't have it before and also the recreation of dxil version
information from metadata where necessary.
Many changes were needed for the MatrixBitcastLower pass related to
linking to avoid converting matrix vectors, but also to perform the
conversion if a shader was compiled for 6.9+, but then linked to a
earlier target.
This now adapts to the linker target to either preserve vectors for 6.9
or arrays for previous versions.
This requires running the DynamicIndexing VectorToArray pass during
linking since 6_x and 6_9+ will fail to run this in the initial compile,
but will still need to lower vectors to arrays. This required making the pass
particularly robust to different sources of version information as compiling,
linking, and running optimization in isolation each require retrieval from
a different source. The latter two sources are facilitated with a dxilutil function.
Ternary conditional/select operators were element extracted in codegen.
Removing this allows 6.9 to preserve the vectors, but also maintains
behavior for previous shader models because the operations get
scalarized later anyway. This was in the region of work to allow short
circuiting, but the effect of that is to introduce the select and skip the later
code that implements short circuiting for supported cases. Test confirm that
no short circuiting is introduced for native vectors.
Adds extensive tests for these operations using different types and
sizes and testing them appropriately. Booleans produce significantly
different code, so they get their own test.
Vec1s have some special treatment as they are not allowed in final dxil,
so they still need to be scalarized. This requires value specific conditionals
in transformation passes. Testing confirms that this is done.
Fixes#7123
0 commit comments