mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
tint: Show the reason for a uniformity requirement
When producing an error from the uniformity analysis, add notes to show the underlying reason for the uniformity requirement. For function calls that are required-to-be-uniform, show the innermost builtin call that has the requirement. For function parameters that are required-to-be-uniform, recurse into that function to show where its requirement comes from. Add some new tests to specifically test the error messages. Bug: tint:880 Change-Id: Ib166fdeceaffb156a3afc50ebc5a4ad0860dc002 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89722 Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
warning: parameter 'dimInner' of 'mm_matMul_i1_i1_i1_' must be uniform
|
||||
note: 'workgroupBarrier' must only be called from uniform control flow
|
||||
#version 310 es
|
||||
|
||||
struct Uniforms {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
warning: parameter 'dimInner' of 'mm_matMul_i1_i1_i1_' must be uniform
|
||||
note: 'workgroupBarrier' must only be called from uniform control flow
|
||||
static int dimAOuter_1 = 0;
|
||||
cbuffer cbuffer_x_48 : register(b3, space0) {
|
||||
uint4 x_48[5];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
warning: parameter 'dimInner' of 'mm_matMul_i1_i1_i1_' must be uniform
|
||||
note: 'workgroupBarrier' must only be called from uniform control flow
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
warning: parameter 'dimInner' of 'mm_matMul_i1_i1_i1_' must be uniform
|
||||
note: 'workgroupBarrier' must only be called from uniform control flow
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
warning: parameter 'dimInner' of 'mm_matMul_i1_i1_i1_' must be uniform
|
||||
note: 'workgroupBarrier' must only be called from uniform control flow
|
||||
struct Uniforms {
|
||||
NAN : f32,
|
||||
@size(12)
|
||||
|
||||
Reference in New Issue
Block a user