Commit Graph

831 Commits

Author SHA1 Message Date
dan sinclair 45292213bd [spirv-writer] Emit ShiftRightArithmetic.
This CL updates the SPIR-V writer to emit the arithmetic right shift if
the LHS of the expression is a signed scalar or vector.

Bug: tint:84
Change-Id: I4ca33a31783e1954515db5f12b2cf1d364aedee4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28940
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 14:29:29 +00:00
dan sinclair effd888d2f Convert computeboids to for().
This CL updates computeboids to use the `for()` sugar instead of the
loop/continuing block.

Change-Id: I13f416624821a87fbfa40b15669980bedc794ed4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28842
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-23 14:51:03 +00:00
dan sinclair 596fcdcec6 [spirv-writer] Fix ! to emit logical not.
The ! operator should emit an OpLogicalNot instead of an OpNot.

Bug: tint:248
Change-Id: I6e404c3286db7819e0692603e3cf9a87a1b37ed9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28841
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-23 14:45:24 +00:00
dan sinclair d7abd76dea Update computeboids typing.
This Cl updates some of the literals and types in computeboids to be
stricter.

Bug: tint:248
Change-Id: I3bc42b8da7913677675d6e417b7f4ce19366eeb9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28840
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-23 14:40:54 +00:00
dan sinclair a7d498e060 Rename 'as' to 'bitcast'
This CL updates Tint to use 'bitcast' instead of 'as' for the OpBitcast
conversions.

Bug: tint:241
Change-Id: I53a80de10421b2d9cc009527eebe5ff07e1285c2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28801
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-22 22:07:13 +00:00
dan sinclair b4fee2f824 Update builtin methods.
This CL removes the import mechanism, the identifier paths and updates
all of the standard library methods to be builtins.

Bug: tint:242
Change-Id: If09b98a155ae49ced3986ba2c9b517a060693006
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28720
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-22 19:42:13 +00:00
dan sinclair 5f8126271d Remove EntryPoint.
This CL removes the EntryPoint node and transitions everything to the
stage decoration.

Change-Id: Ib2840155905c8fa60ff35870f0c4b6705efb73ff
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28705
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-22 14:53:03 +00:00
dan sinclair de2a019a7f [spirv-reader] Emit StageDecoration when building the functions
This CL adds the emission of StageDecoration to entry point functions.
EntryPoint nodes are still emitted. We duplicate the function emission
if there are multiple entry points pointing to the same function.

Change-Id: Icb48a063f5c6a30948bbe2c37c7fce7431af5864
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28665
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-22 14:22:12 +00:00
dan sinclair f91b9664e7 [hlsl-writer] Emit function decoration stage
This CL updates the hlsl writer to emit stage decorations.

Change-Id: Ic9ae9fbd47537f141949e27c876d37e6d4dcd97d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28704
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-22 13:47:32 +00:00
dan sinclair b5bb2d91af [msl-writer] Update to emit based on pipeline stage.
This CL updates the MSL writer to emit data base on the pipeline stage.

Change-Id: I9fb2e146f0c898d9703d69a6a92f535757106bba
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28703
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-21 18:58:01 +00:00
dan sinclair a8274b2fef [spirv-writer] Emit entrypoint from function decoration.
This CL updates the SPIRV-Writer to emit entry point information based
on the function stage as well as EntryPoint nodes.

Change-Id: I1fa937cbb2159b31516b0189216d679e03f0384d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28702
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 18:49:01 +00:00
dan sinclair 48d08d2147 [wgsl-writer] Emit stage decorations.
This CL updates the wgsl writer to emit the stage decorations.

Change-Id: I0501088e074aa5d027f83fd0a2ac45ba3f36332f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28701
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-21 17:59:51 +00:00
dan sinclair 51ac24ab10 [validate] Update to validate pipeline stages.
This CL converts the validator to work against the pipeline stages
attached to functions instead of entry point nodes.

Change-Id: Ia6274423e49426766c527d1123880ef6e0140959
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28700
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-21 17:56:41 +00:00
dan sinclair 0592643782 [type-determiner] Update to work with entry point and function stages.
This Cl updates the type determiner to work with both styles of entry
point definition.

Change-Id: Ic48f1a5f0a5820821f9a74380896426a97483049
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28666
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-21 17:51:31 +00:00
dan sinclair 767ea855ab [wgsl-reader] Parse stage decoration
This CL adds parsing of the stage decoration to the WGSL parser. The
decoration is not hooked up yet so it's effectively ignored.

Change-Id: I8d86c55cee189f993c10b6da31a9c388ba452021
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28664
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-21 17:42:10 +00:00
dan sinclair b6841789bd Simple architecture document
This CL adds the start of an architecture document which can be expanded
as needed. The document is mostly an architecture diagram of how the
various pieces fit together.

Change-Id: I49b6509b9178928d100aece3c284199060969b6c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28660
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 16:00:11 +00:00
dan sinclair cb907b5bc2 [wgsl-reader] Fix issue with missing open brace for functions.
This Cl fixes the function parsing so the opening brace is required.
This will return an error now. The statement::body_stmt is changed to
make the open paren optional.

Bug: tint:236
Change-Id: I3faee1fd5add19aebcdb86943d6f4190c03d0f7a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28520
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-21 15:55:32 +00:00
dan sinclair 43d17780ca [spirv-writer] Add multisampled textureLoad test.
This CL adds a test for multisampled textureLoad and fixes up a few type
determiner issues for multisampled textures.

Bug: tint:237
Change-Id: I5c33797b197b6f092842b22aa93d2076b0779766
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28582
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 15:52:10 +00:00
dan sinclair 64f9cdec68 [spirv-writer] Simplify the texture intrinsic tests
This CL removes the complete coverage of the possible input formats
infavor of simpler testing of a few of the inputs. This should be
sufficient coverage and makes the tests easier to read.

The incorrect OpConstantNull for the samplers and textures has also been
removed.

Change-Id: I9cd7d6299f0454bb8e2019968e0422221e4ec183
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28581
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 15:46:00 +00:00
dan sinclair 4dc0d7d311 Simplify SPIR-V builder texture type tests.
This CL removes the instantiated test suites, instead it tests each of
the required formats with one texture type and then uses the rest of the
tests to verify the texture type generated is correct.

This makes the tests a lot easier to read as the string generation for
results is removed.

Change-Id: I2c54471a2afc8bf2602ec8e4b50b27ad078dc4ee
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28580
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 15:38:10 +00:00
dan sinclair 2dbe9aa784 [hlsl-writer][msl-writer] Enable generate tests.
This CL fixes and enables the generic generate tests for both the MSL
and HLSL writers.

Bug: tint:7 tint:8
Change-Id: I7a3e76196a7c50bd30dcd55940686dc8269786f1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28441
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-21 15:16:20 +00:00
dan sinclair d05f93fd8e [wgsl-reader] Add workgroup_size parsing
This CL adds parsing of the `workgroup_size` function decoration.

Change-Id: Ia90efc2c014ac0e1614429280cc903d30cf8171d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28663
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-21 00:37:08 +00:00
dan sinclair 643827967e [ast][spirv-writer][hlsl-writer][wgsl-writer] Add workgroup_size decoration
This CL adds the workgroup_size decoration to functions and emits as
needed from the various backends.

Change-Id: Ifffde239e68047f6419c6980eca70c4efa9822c0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28662
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 00:28:58 +00:00
dan sinclair 35552f2a48 [wgsl-reader][wgsl-writer] Update variable decorations to new syntax.
This CL updates the variable decorations to require ()'s around
parameters.

Bug: tint:238
Change-Id: I835879f41349756ace553a52fc2d460173e70dce
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28583
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-20 23:02:48 +00:00
dan sinclair 077d16d5e1 [wgsl-reader][wgsl-writer] Update array decorations to new syntax.
This CL updates the array decorations to the new syntax requiring ()'s
around parameters.

Bug: tint:238
Change-Id: I5a8b19e302fbd3f78392553d8d1c5e882b900180
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28601
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-20 21:28:18 +00:00
dan sinclair 636d588f6e [ast] Add decorations to functions.
This CL extends the function AST object to allow function decorations to
be attached.

Change-Id: I5b16aa2e6927792368b7f88047c0229e258b5bd3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28661
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-20 19:18:58 +00:00
dan sinclair 8b685866cd [wgsl-reader][wgsl-writer] Update struct decorations to new syntax.
This CL updates the parsing of struct decorations to require ()'s around
parameters.

Bug: tint:238
Change-Id: Ia35ca5c260c3c57b5fc95788bd1aef07f75edc39
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28600
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-20 19:14:28 +00:00
dan sinclair d3f75ca0e8 Add support for multisampled textures.
This Cl adds the AST, WGSL-Reader and SPIRV-Writer support for the
`texture_multisampled_2d` type.

Bug: tint:237
Change-Id: Ib3eb831227b49f32162801f1e1b4e474774c78b3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28480
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-17 03:53:04 +00:00
dan sinclair 83ed2cc2b9 [wgsl-writer] Emit texture types.
This CL adds texture type emission to the WGSL writer.

Bug: tint:144
Change-Id: I18e40a587b77b953f17a6d0ad1a75a1bc4158ef0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28460
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-17 02:51:03 +00:00
dan sinclair 5e989306e5 [type-determiner] Handle pointer arguments.
Currently if the type determiner is determining an identifier it will
wrap it into a pointer if it isn't a constant. This CL updates to make
sure we don't already have a pointer as otherwise we endup with a double
pointer.

Bug: tint:216
Change-Id: I2f8c83bd8680df6c3aef31e1cbb754fdff709b4b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28442
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-16 21:20:36 +00:00
Tomek Ponitka 43759bff1c [wgsl-reader] Adding texture_sampler_types to type_decl
Bug: tint:147
Change-Id: Ib806d5c434e98632a83ad8802a3a0aeea609c8c2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28125
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-15 18:35:43 +00:00
dan sinclair 3af512046e [hlsl-writer] Implement some disabled tests.
This CL fills in some of the disabled tests around function entry points
and global variables.

Bug: tint:7
Change-Id: Iff40944fbac9985eeafcc7c8a105652b217ff924
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28440
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-14 19:45:53 +00:00
David Neto 0e70e71a87 [spirv-reader]: entry point names are WGSL identifiers
Bug: tint:233, tint:3
Change-Id: Ib753c47c4a77b852e5065c540da79d8cebe6a100
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28282
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-10 17:01:47 +00:00
David Neto 66dd683148 Fix doxygen: don't describe return of void method
Change-Id: Ib5795e44cbf23155dc2d2a7dcd6466e68dac4e2d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28281
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-10 16:20:17 +00:00
Sarah Mashayekhi aff58c6cac [validation] add cts tests for switch
This CL adds wgsl tests for the following rules:
v-switch01: switch statement selector expression must be of a scalar integer type
v-0008: switch statement must have exactly one default clause
v-switch03: the case selector values must have the same type as the selector expression the case selectors for a switch statement
v-switch04: a literal value must not appear more than once in the case selectors for a switch statement
v-switch05: a fallthrough statement must not appear as the last statement in last clause of a switch

Bug: tint: 6
Change-Id: Ia12b7d13d47b01e970a5a1e58d61ef05dd9f3830
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28320
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-10 14:55:17 +00:00
Sarah Mashayekhi 2e9f1f54c8 [validation] validate switch statement
This CL adds validation for the following rules:
v-switch01: switch statement selector expression must be of a scalar integer type
v-0008: switch statement must have exactly one default clause
v-switch03: the case selector values must have the same type as the selector expression the case selectors for a switch statement
v-switch04: a literal value must not appear more than once in the case selectors for a switch statement
v-switch05: a fallthrough statement must not appear as the last statement in last clause of a switch

Bug: tint: 6
Change-Id: I264d5079cc6cb31075965c8721651dc76f3e2a24
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28062
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-10 14:37:17 +00:00
Tomek Ponitka ed0527a016 Adding a TODO for updating textureLoad on storage images
Change-Id: I1d724a1743caa94ba040aca804dfac6abbb2d6e5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Tomek Ponitka <tommek@google.com>
2020-09-10 14:15:37 +00:00
David Neto b6adc5bd42 Simplify getting entry point function
The get-by-name method on the function stack already
tells us if the name exists.  We don't have to check,
and then get it later.

Change-Id: I26a1d395a9986df48f598055c3bc2864d94c87a8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28260
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-08 19:16:05 +00:00
David Neto 0ecac8f6ab Fix GCC warnings
Change-Id: I9c719298a25d28f964c0a987c35fc94426807d51
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28180
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-08 17:56:55 +00:00
Tomek Ponitka bcb6eb0830 [wgsl-reader] Parsing storage texture type
Bug: tint:147
Change-Id: I446786b529e777d709213e100e57cbae78ded75f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28122
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-08 16:48:09 +00:00
Tomek Ponitka 03f5e2fc9d [wgsl-reader] Parsing image storage type
Bug: tint:147
Change-Id: I79713b5dfa0a4b219cff7a6bb3c514557cf4f261
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28121
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-08 16:38:39 +00:00
Tomek Ponitka 4e2d2484f8 [ast] Change intrinsic function names to camel case
Change-Id: I227eade96ccf84a4ed006cc5e98ac9e47f44129a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28163
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-08 16:30:29 +00:00
Tomek Ponitka cd862fdc7c [spirv-writer] Removing GenerateConstantFloatZeroIfNeeded
Bug: tint:143
Change-Id: I81b4ec280264ec175736bae32bf1826d565ed5c0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28162
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-08 16:28:59 +00:00
Tomek Ponitka e4f60fa0be [spirv-writer] Fixing memory leaks in texture intrinsics tests
The variables are no longer released.

Bug: tint:143
Change-Id: I56a3edd0e7acb3c729aa82851879d69e510298db
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28164
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Tomek Ponitka <tommek@google.com>
2020-09-07 12:05:28 +00:00
David Neto f51a48dc49 [spirv-reader] Set entry point name
Until now, we were only setting the function name.

Bug: tint:3
Change-Id: I6d82f6e9744201a04cc8969013694e2e8304a928
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28080
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-09-03 18:52:47 +00:00
Tomek Ponitka e46282a956 [spirv-writer] Generating texture intrinsic operations
Bug: tint:143
Change-Id: Ibc5b232b952b8ecd8d5d87a7486cdfbc1af29fa4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27641
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-03 17:26:57 +00:00
Sarah Mashayekhi b693b4c10d [validation] add const variables shouldn't have a storage class
This CL adds a rule to separate global variables and global consts in regards to storage class:
v-0022: Global variables must have a storage class
v-global01: const variables shouldn't have a storage class

Bug: tint: 225
Change-Id: I53d84afd771c78d91eaf47568e954986abf38e58
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28141
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-03 17:20:07 +00:00
Sarah Mashayekhi 75c492a0cc [writer] add a return to convert_image_format_to_spv
This CL adds a return to convert_image_format_to_spv function to stop
clang from failing with this error: "control reaches end of non-void
function." because we haven't covered all the enums in the switch.

Change-Id: Ibcb02ff52ca4c6e597a36f5c3d57e41df9e7b02a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28061
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-03 17:17:37 +00:00
dan sinclair e7ec7f1689 [wgsl-writer] Add GenerateEntryPoint
This Cl adds the preliminary GenerateEntryPoint method to the WGSL
writer.

Bug: tint:211
Change-Id: Ib414ff66d482179f10eeeb890f6127bc585cd664
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28045
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-03 01:46:36 +00:00
dan sinclair 2dc982f7ea Stub out the method to generate individual entry points.
This CL adds the stub methods for the various backends to generate
individual <pipeline stage, entry point> pairs.

Bug: tint:211
Change-Id: I7c5c6af4b44cb78976e4388a2b2174ee1a116531
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28044
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-03 01:07:46 +00:00