wgpu/naga/tests/in
Brad Werth 9b7a965667 Add an experimental vertex pulling flag to Metal pipelines.
This proves a flag in msl::PipelineOptions that attempts to write all
Metal vertex entry points to use a vertex pulling technique. It does
this by:

1) Forcing the _buffer_sizes structure to be generated for all vertex
entry points. The structure has additional buffer_size members that
contain the byte sizes of the vertex buffers.
2) Adding new args to vertex entry points for the vertex id and/or
the instance id and for the bound buffers. If there is an existing
@builtin(vertex_index) or @builtin(instance_index) param, then no
duplicate arg is created.
3) Adding code at the beginning of the function for vertex entry points
to compare the vertex id or instance id against the lengths of all the
bound buffers, and force an early-exit if the bounds are violated.
4) Extracting the raw bytes from the vertex buffer(s) and unpacking
those bytes into the bound attributes with the expected types.
5) Replacing the varyings input and instead using the unpacked
attributes to fill any structs-as-args that are rebuilt in the entry
point.

A new naga test is added which exercises this flag and demonstrates the
effect of the transform. The msl generated by this test passes
validation.

Eventually this transformation will be the default, always-on behavior
for Metal pipelines, though the flag may remain so that naga
translation tests can be run with and without the tranformation.
2024-05-30 13:08:59 +02:00
..
glsl Nested loop test 2024-02-28 13:54:27 +01:00
spv spv-in parsing Op::AtomicIIncrement (#5702) 2024-05-30 04:39:32 +00:00
abstract-types-const.wgsl [naga] Rename abstract-types snapshots abstract-types-const. 2023-12-06 10:35:21 +01:00
abstract-types-operators.wgsl [naga wgsl] Let unary operators accept and produce abstract types. 2023-12-14 10:54:46 +01:00
abstract-types-var.wgsl [naga wgsl-in] Automatic conversions for local var initializers. 2023-12-06 10:35:21 +01:00
access.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
access.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
array-in-ctor.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
array-in-ctor.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
array-in-function-return-type.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
array-in-function-return-type.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
atomicCompareExchange.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
atomicOps.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
binding-arrays.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
binding-arrays.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
binding-buffer-arrays.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
binding-buffer-arrays.wgsl spv-out: Support arrayLength of a dynamically indexed bindings array 2024-04-02 19:22:34 +02:00
bitcast.params.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
bitcast.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
bits.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
bits.wgsl Add parsing support for un/pack4xI/U8 2024-05-14 17:57:04 +02:00
boids.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
boids.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-image-restrict.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-image-restrict.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-image-rzsw.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-image-rzsw.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-restrict.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-restrict.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-zero-atomic.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-zero-atomic.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-zero.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
bounds-check-zero.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
break-if.wgsl [naga wgsl-in] Fix parsing break ifs 2024-01-08 10:50:38 +01:00
collatz.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
collatz.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
const-exprs.wgsl [naga] Teach the constant evaluator vector/vector operators. 2023-12-12 12:48:10 +01:00
constructors.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
constructors.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
control-flow.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
control-flow.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
cubeArrayShadow.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
debug-symbol-large-source.param.ron fix(spv-out): OpSourceContinued for large source (gfx-rs#5390) 2024-04-08 11:27:18 +02:00
debug-symbol-large-source.wgsl fix(spv-out): OpSourceContinued for large source (gfx-rs#5390) 2024-04-08 11:27:18 +02:00
debug-symbol-simple.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
debug-symbol-simple.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
debug-symbol-terrain.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
debug-symbol-terrain.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
dualsource.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
dualsource.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
empty.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
empty.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
extra.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
extra.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
f64.param.ron [naga wgsl] Experimental 64-bit floating-point literals. 2023-11-23 12:17:21 +01:00
f64.wgsl [naga wgsl] Experimental 64-bit floating-point literals. 2023-11-23 12:17:21 +01:00
force_point_size_vertex_shader_webgl.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
force_point_size_vertex_shader_webgl.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
fragment-output.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
functions-webgl.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
functions-webgl.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
functions.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
functions.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
globals.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
globals.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
hlsl-keyword.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
image.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
image.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
int64.param.ron Add shader I64 and U64 support (#5154) 2024-03-12 12:34:06 +01:00
int64.wgsl Add shader I64 and U64 support (#5154) 2024-03-12 12:34:06 +01:00
interface.param.ron Add an experimental vertex pulling flag to Metal pipelines. 2024-05-30 13:08:59 +02:00
interface.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
interpolate.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
interpolate.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
invariant.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
invariant.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
lexical-scopes.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
math-functions.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
math-functions.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
module-scope.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
msl-varyings.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
multiview_webgl.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
multiview_webgl.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
multiview.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
multiview.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
operators.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
operators.wgsl [naga] Change operators.wgsl to use values that matter. 2023-12-12 12:48:10 +01:00
overrides-atomicCompareExchangeWeak.param.ron [naga] Handle comparison operands in pipeline constant evaluation. 2024-04-05 18:07:41 +02:00
overrides-atomicCompareExchangeWeak.wgsl [naga] Handle comparison operands in pipeline constant evaluation. 2024-04-05 18:07:41 +02:00
overrides-ray-query.param.ron [naga] Adjust RayQuery statements in override processing. 2024-04-05 18:07:41 +02:00
overrides-ray-query.wgsl [naga] Adjust RayQuery statements in override processing. 2024-04-05 18:07:41 +02:00
overrides.param.ron [spv/msl/hlsl-out] support pipeline constant value replacements 2024-04-05 18:07:41 +02:00
overrides.wgsl [naga] add Expression::Override to needs_pre_emit 2024-04-22 08:38:31 -07:00
padding.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
padding.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
pointers.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
pointers.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
policy-mix.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
policy-mix.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
push-constants.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
push-constants.wgsl Test And Normalize Vertex Behavior on All Backends (#4723) 2023-11-21 22:11:24 +00:00
quad.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
quad.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
ray-query.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
ray-query.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
resource-binding-map.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
resource-binding-map.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
runtime-array-in-unused-struct.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
sample-cube-array-depth-lod.param.ron Fix glsl backend errors regarding samplerCubeArrayShadow (#5171) 2024-02-08 18:27:58 +01:00
sample-cube-array-depth-lod.wgsl Fix glsl backend errors regarding samplerCubeArrayShadow (#5171) 2024-02-08 18:27:58 +01:00
separate-entry-points.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
separate-entry-points.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
shadow.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
shadow.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
skybox.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
skybox.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
sprite.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
sprite.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
standard.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
standard.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
struct-layout.wgsl test(naga): add struct-layout test 2023-11-22 03:54:16 -07:00
subgroup-operations.param.ron Subgroup Operations (#5301) 2024-04-17 15:25:52 -04:00
subgroup-operations.wgsl Subgroup Operations (#5301) 2024-04-17 15:25:52 -04:00
texture-arg.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
texture-arg.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
type-alias.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
use-gl-ext-over-grad-workaround-if-instructed.param.ron Fix glsl backend errors regarding samplerCubeArrayShadow (#5171) 2024-02-08 18:27:58 +01:00
use-gl-ext-over-grad-workaround-if-instructed.wgsl Fix glsl backend errors regarding samplerCubeArrayShadow (#5171) 2024-02-08 18:27:58 +01:00
variations.glsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
vertex-pulling-transform.param.ron Add an experimental vertex pulling flag to Metal pipelines. 2024-05-30 13:08:59 +02:00
vertex-pulling-transform.wgsl Add an experimental vertex pulling flag to Metal pipelines. 2024-05-30 13:08:59 +02:00
workgroup-uniform-load.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00
workgroup-var-init.param.ron Move naga to subfolder 2023-10-25 14:25:04 -04:00
workgroup-var-init.wgsl Move naga to subfolder 2023-10-25 14:25:04 -04:00