intrinsics: Limit fwidth builtins to fragment shaders

This fixes the SPIR-V and MSL tests for these intrinsics.

Change-Id: Id6f48682285ff17cb1fa7ef618f34b02f553332b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55681
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
James Price
2021-06-22 20:19:49 +00:00
committed by Tint LUCI CQ
parent f37f8df38b
commit e0cc771e0a
62 changed files with 156 additions and 1326 deletions

View File

@@ -6807,7 +6807,7 @@ constexpr OverloadInfo kOverloads[] = {
/* open numbers */ &kOpenNumbers[7],
/* parameters */ &kParameters[564],
/* return matcher indices */ &kMatcherIndices[7],
/* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
/* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
/* is_deprecated */ false,
},
{
@@ -6819,7 +6819,7 @@ constexpr OverloadInfo kOverloads[] = {
/* open numbers */ &kOpenNumbers[1],
/* parameters */ &kParameters[563],
/* return matcher indices */ &kMatcherIndices[10],
/* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
/* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
/* is_deprecated */ false,
},
{
@@ -6831,7 +6831,7 @@ constexpr OverloadInfo kOverloads[] = {
/* open numbers */ &kOpenNumbers[7],
/* parameters */ &kParameters[562],
/* return matcher indices */ &kMatcherIndices[7],
/* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
/* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
/* is_deprecated */ false,
},
{
@@ -6843,7 +6843,7 @@ constexpr OverloadInfo kOverloads[] = {
/* open numbers */ &kOpenNumbers[1],
/* parameters */ &kParameters[561],
/* return matcher indices */ &kMatcherIndices[10],
/* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
/* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
/* is_deprecated */ false,
},
{
@@ -6855,7 +6855,7 @@ constexpr OverloadInfo kOverloads[] = {
/* open numbers */ &kOpenNumbers[7],
/* parameters */ &kParameters[560],
/* return matcher indices */ &kMatcherIndices[7],
/* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
/* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
/* is_deprecated */ false,
},
{
@@ -6867,7 +6867,7 @@ constexpr OverloadInfo kOverloads[] = {
/* open numbers */ &kOpenNumbers[1],
/* parameters */ &kParameters[559],
/* return matcher indices */ &kMatcherIndices[10],
/* supported_stages */ PipelineStageSet(PipelineStage::kVertex, PipelineStage::kFragment, PipelineStage::kCompute),
/* supported_stages */ PipelineStageSet(PipelineStage::kFragment),
/* is_deprecated */ false,
},
{

View File

@@ -311,12 +311,12 @@ fn fract(f32) -> f32
fn fract<N: num>(vec<N, f32>) -> vec<N, f32>
fn frexp<T: iu32, S: function_private_workgroup, A: access>(f32, ptr<S, T, A>) -> f32
fn frexp<N: num, T: iu32, S: function_private_workgroup, A: access>(vec<N, f32>, ptr<S, vec<N, T>, A>) -> vec<N, f32>
fn fwidth(f32) -> f32
fn fwidth<N: num>(vec<N, f32>) -> vec<N, f32>
fn fwidthCoarse(f32) -> f32
fn fwidthCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
fn fwidthFine(f32) -> f32
fn fwidthFine<N: num>(vec<N, f32>) -> vec<N, f32>
[[stage("fragment")]] fn fwidth(f32) -> f32
[[stage("fragment")]] fn fwidth<N: num>(vec<N, f32>) -> vec<N, f32>
[[stage("fragment")]] fn fwidthCoarse(f32) -> f32
[[stage("fragment")]] fn fwidthCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
[[stage("fragment")]] fn fwidthFine(f32) -> f32
[[stage("fragment")]] fn fwidthFine<N: num>(vec<N, f32>) -> vec<N, f32>
fn ignore<T>(T)
fn inverseSqrt(f32) -> f32
fn inverseSqrt<N: num>(vec<N, f32>) -> vec<N, f32>