|
9 | 9 | "rationale": "for", |
10 | 10 | "steps": [ |
11 | 11 | { |
12 | | - "html": "<p>For each diagnostic <em>D</em>, find the <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-filter\" id=\"ref-for-diagnostic-filter\">diagnostic filter</a> with the smallest <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#affected-range\" id=\"ref-for-affected-range\">affected range</a> that contains D’s <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-triggering-location\" id=\"ref-for-diagnostic-triggering-location①\">triggering location</a>, and which has the same <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-triggering-rule\" id=\"ref-for-diagnostic-triggering-rule②\">triggering rule</a>.</p>\n <ul>\n <li data-md=\"\">\n <p>If such a filter exists, apply it to <em>D</em>, updating <em>D</em>'s <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-severity\" id=\"ref-for-diagnostic-severity①\">severity</a>.</p>\n </li><li data-md=\"\">\n <p>Otherwise <em>D</em> remains unchanged.</p>\n </li></ul>" |
| 12 | + "html": "<p>For each diagnostic <em>D</em>, find the <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-filter\" id=\"ref-for-diagnostic-filter\">diagnostic filter</a>\nwith the smallest <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#affected-range\" id=\"ref-for-affected-range\">affected range</a> that contains D’s <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-triggering-location\" id=\"ref-for-diagnostic-triggering-location①\">triggering location</a>, and which has the same <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-triggering-rule\" id=\"ref-for-diagnostic-triggering-rule②\">triggering rule</a>.</p>\n <ul>\n <li data-md=\"\">\n <p>If such a filter exists, apply it to <em>D</em>, updating <em>D</em>'s <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#diagnostic-severity\" id=\"ref-for-diagnostic-severity①\">severity</a>.</p>\n </li><li data-md=\"\">\n <p>Otherwise <em>D</em> remains unchanged.</p>\n </li></ul>" |
13 | 13 | }, |
14 | 14 | { |
15 | 15 | "html": "<p>Discard diagnostics that have severity <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#severity-off\" id=\"ref-for-severity-off\">off</a>.</p>" |
|
24 | 24 | "html": "<p>If at least one remaining diagnostic has <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#severity-error\" id=\"ref-for-severity-error\">error</a> severity, then:</p>\n <ul>\n <li data-md=\"\">\n <p>Other diagnostics <em>may</em> be discarded, including other diagnostics with <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#severity-error\" id=\"ref-for-severity-error①\">error</a> severity.</p>\n </li><li data-md=\"\">\n <p>A <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#program-error\" id=\"ref-for-program-error\">program error</a> is generated.</p>\n <ul>\n <li data-md=\"\">\n <p>The error is a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#shader-creation-error\" id=\"ref-for-shader-creation-error②\">shader-creation error</a> if the diagnostic was triggered at <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#shader-module-creation\" id=\"ref-for-shader-module-creation③\">shader module creation</a> time.</p>\n </li><li data-md=\"\">\n <p>The error is a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#pipeline-creation-error\" id=\"ref-for-pipeline-creation-error②\">pipeline-creation error</a> if the diagnostic was triggered at <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#pipeline-creation\" id=\"ref-for-pipeline-creation②\">pipeline creation</a> time.</p>\n </li></ul>\n </li></ul>" |
25 | 25 | }, |
26 | 26 | { |
27 | | - "html": "<p>If processing during <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#shader-module-creation\" id=\"ref-for-shader-module-creation④\">shader module creation</a> time, the remaining diagnostics populate the <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://gpuweb.github.io/gpuweb/#dom-gpucompilationinfo-messages\" id=\"ref-for-dom-gpucompilationinfo-messages\">messages</a></code> member of the WebGPU <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://gpuweb.github.io/gpuweb/#gpucompilationinfo\" id=\"ref-for-gpucompilationinfo\">GPUCompilationInfo</a></code> object.</p>" |
| 27 | + "html": "<p>If processing during <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#shader-module-creation\" id=\"ref-for-shader-module-creation④\">shader module creation</a> time, the remaining diagnostics populate the\n<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://gpuweb.github.io/gpuweb/#dom-gpucompilationinfo-messages\" id=\"ref-for-dom-gpucompilationinfo-messages\">messages</a></code> member of the WebGPU <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://gpuweb.github.io/gpuweb/#gpucompilationinfo\" id=\"ref-for-gpucompilationinfo\">GPUCompilationInfo</a></code> object.</p>" |
28 | 28 | }, |
29 | 29 | { |
30 | 30 | "html": "<p>If processing during <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#pipeline-creation\" id=\"ref-for-pipeline-creation③\">pipeline creation</a>, <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#severity-error\" id=\"ref-for-severity-error②\">error</a> diagnostics\nresult in WebGPU validation failure when validating <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://gpuweb.github.io/gpuweb/#gpuprogrammablestage\" id=\"ref-for-gpuprogrammablestage③\">GPUProgrammableStage</a></code>.</p>" |
|
53 | 53 | "html": "<p>For each candidate <var>C</var>, enumerate conversion ranks for subexpressions in the syntactic phrase.\nThe candidate’s preconditions have been met, and so for the <var>i</var>’th subexpression in the <var>P</var>:</p>\n <ul>\n <li data-md=\"\">\n <p>Its static type has been computed.</p>\n </li><li data-md=\"\">\n <p>There is a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#feasible-automatic-conversion\" id=\"ref-for-feasible-automatic-conversion③\">feasible automatic conversion</a> from the expression’s static type to the type required by the corresponding type assertion in the preconditions.\nLet <var>C</var>.<var>R</var>(i) be the <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#conversionrank\" id=\"ref-for-conversionrank②\">ConversionRank</a> of that conversion.</p>\n </li></ul>" |
54 | 54 | }, |
55 | 55 | { |
56 | | - "html": "<p>Eliminate any candidate where one of its subexpressions resolves to an <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#type-abstract\" id=\"ref-for-type-abstract②\">abstract</a> type after <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#feasible-automatic-conversion\" id=\"ref-for-feasible-automatic-conversion④\">feasible automatic conversions</a>, but another\nof the candidate’s subexpressions is not a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#const-expressions\" id=\"ref-for-const-expressions③\">const-expression</a>.</p>" |
| 56 | + "html": "<p>Eliminate any candidate where one of its subexpressions resolves to an\n<a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#type-abstract\" id=\"ref-for-type-abstract②\">abstract</a> type after <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#feasible-automatic-conversion\" id=\"ref-for-feasible-automatic-conversion④\">feasible automatic conversions</a>, but another\nof the candidate’s subexpressions is not a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#const-expressions\" id=\"ref-for-const-expressions③\">const-expression</a>.</p>" |
57 | 57 | }, |
58 | 58 | { |
59 | 59 | "html": "<p>Rank candidates: Given two overload candidates <var>C1</var> and <var>C2</var>, <var>C1</var> is <dfn class=\"dfn-paneled has-dfn-panel\" data-dfn-type=\"dfn\" data-lt=\"preferable candidate\" data-noexport=\"\" id=\"preferable-candidate\" role=\"button\" aria-expanded=\"false\" tabindex=\"0\">preferred</dfn> over <var>C2</var> if:</p>\n <ul>\n <li data-md=\"\">\n <p>For each expression position <var>i</var> in <var>P</var>, <var>C1</var>.<var>R</var>(i) ≤ <var>C2</var>.<var>R</var>(i).</p>\n <ul>\n <li data-md=\"\">\n <p>That is, each expression conversion required to apply <var>C1</var> to <var>P</var> is at least as preferable as the corresponding expression conversion required to apply <var>C2</var> to <var>P</var>.</p>\n </li></ul>\n </li><li data-md=\"\">\n <p>There is at least one expression position <var>i</var> where <var>C1</var>.<var>R</var>(i) < <var>C2</var>.<var>R</var>(i).</p>\n <ul>\n <li data-md=\"\">\n <p>That is, there is at least one expression conversion required to apply <var>C1</var> that is strictly more preferable than the corresponding conversion required to apply <var>C2</var>.</p>\n </li></ul>\n </li></ul>" |
|
86 | 86 | "html": "<p><a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#atomic-type\" id=\"ref-for-atomic-type⑦\">Atomic types</a> can only appear in mutable storage buffers or workgroup\nvariables.</p>" |
87 | 87 | }, |
88 | 88 | { |
89 | | - "html": "<p>The data in <a href=\"https://gpuweb.github.io/gpuweb/wgsl/#texture-storage\">storage textures</a> with a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#access-write\" id=\"ref-for-access-write②\">write</a> or <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#access-read_write\" id=\"ref-for-access-read_write⑧\">read_write</a> <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#access-mode\" id=\"ref-for-access-mode①③\">access mode</a> is mutable, but can only be\nmodified via <a href=\"https://gpuweb.github.io/gpuweb/wgsl/#texturestore\">textureStore</a> built-in function.\nThe variable itself cannot be modified.</p>" |
| 89 | + "html": "<p>The data in <a href=\"https://gpuweb.github.io/gpuweb/wgsl/#texture-storage\">storage textures</a> with a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#access-write\" id=\"ref-for-access-write②\">write</a>\nor <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#access-read_write\" id=\"ref-for-access-read_write⑧\">read_write</a> <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#access-mode\" id=\"ref-for-access-mode①③\">access mode</a> is mutable, but can only be\nmodified via <a href=\"https://gpuweb.github.io/gpuweb/wgsl/#texturestore\">textureStore</a> built-in function.\nThe variable itself cannot be modified.</p>" |
90 | 90 | }, |
91 | 91 | { |
92 | | - "html": "<p>Variables in the <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#address-spaces-workgroup\" id=\"ref-for-address-spaces-workgroup①⓪\">workgroup</a> address space can only be <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#statically-accessed\" id=\"ref-for-statically-accessed④\">statically accessed</a> in a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#compute-shader-stage\" id=\"ref-for-compute-shader-stage①\">compute shader stage</a>.</p>" |
| 92 | + "html": "<p>Variables in the <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#address-spaces-workgroup\" id=\"ref-for-address-spaces-workgroup①⓪\">workgroup</a> address space can only be\n<a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#statically-accessed\" id=\"ref-for-statically-accessed④\">statically accessed</a> in a <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#compute-shader-stage\" id=\"ref-for-compute-shader-stage①\">compute shader stage</a>.</p>" |
93 | 93 | }, |
94 | 94 | { |
95 | | - "html": "<p>The <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#element-count\" id=\"ref-for-element-count②\">element count</a> of the outermost <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#array\" id=\"ref-for-array⑥\">array</a> may be an <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#override-expressions\" id=\"ref-for-override-expressions⑥\">override-expression</a>.</p>" |
| 95 | + "html": "<p>The <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#element-count\" id=\"ref-for-element-count②\">element count</a> of the outermost <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#array\" id=\"ref-for-array⑥\">array</a> may be an\n<a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#override-expressions\" id=\"ref-for-override-expressions⑥\">override-expression</a>.</p>" |
96 | 96 | }, |
97 | 97 | { |
98 | 98 | "html": "<p>If there is no initializer, the variable is <a data-link-type=\"dfn\" href=\"https://gpuweb.github.io/gpuweb/wgsl/#default-initial-value\" id=\"ref-for-default-initial-value\">default\ninitialized</a>.</p>" |
|
0 commit comments