mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
tint/resolver: Allow texture 'offset' to be const-expr
This allows the value to be declared in a `const` expression, and to use arithmetic. Fixed: tint:1636 Change-Id: Ie641a9d4183429c79c91605cd4df78f569be3579 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105623 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
d5139b4463
commit
559a248233
@@ -26,7 +26,8 @@
|
||||
// fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32
|
||||
fn textureSample_0dff6c() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var res: f32 = textureSample(arg_0, arg_1, arg_2, vec2<i32>());
|
||||
const arg_3 = vec2<i32>();
|
||||
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
fn textureSample_0dff6c() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var res : f32 = textureSample(arg_0, arg_1, arg_2, vec2<i32>());
|
||||
const arg_3 = vec2<i32>();
|
||||
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
fn textureSample_17e988() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var arg_3 = 1;
|
||||
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, vec2<i32>());
|
||||
const arg_4 = vec2<i32>();
|
||||
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
fn textureSample_17e988() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var arg_3 = 1;
|
||||
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, vec2<i32>());
|
||||
const arg_4 = vec2<i32>();
|
||||
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
// fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32>
|
||||
fn textureSample_2149ec() {
|
||||
var arg_2 = vec3<f32>();
|
||||
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, vec3<i32>());
|
||||
const arg_3 = vec3<i32>();
|
||||
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
fn textureSample_2149ec() {
|
||||
var arg_2 = vec3<f32>();
|
||||
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, vec3<i32>());
|
||||
const arg_3 = vec3<i32>();
|
||||
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
fn textureSample_60bf45() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var arg_3 = 1;
|
||||
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, vec2<i32>());
|
||||
const arg_4 = vec2<i32>();
|
||||
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
fn textureSample_60bf45() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var arg_3 = 1;
|
||||
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, vec2<i32>());
|
||||
const arg_4 = vec2<i32>();
|
||||
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
// fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
|
||||
fn textureSample_85c4ba() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, vec2<i32>());
|
||||
const arg_3 = vec2<i32>();
|
||||
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
fn textureSample_85c4ba() {
|
||||
var arg_2 = vec2<f32>();
|
||||
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, vec2<i32>());
|
||||
const arg_3 = vec2<i32>();
|
||||
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
|
||||
}
|
||||
|
||||
@fragment
|
||||
|
||||
Reference in New Issue
Block a user