[tint][bench] Trim core benchmarks
perfmon is struggling with the number of benchmarks x CLs in flight. Remove some of the less useful benchmarks. Change-Id: Ib01432e990c437dbc5ef2445da23d4beaf087f68 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134501 Kokoro: Kokoro <noreply+kokoro@google.com> Auto-Submit: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
parent
6c5f683802
commit
409483d2f0
|
@ -68,17 +68,11 @@ std::variant<ProgramAndFile, Error> LoadProgram(std::string name);
|
||||||
|
|
||||||
/// Declares a set of benchmarks for the given function using a list of WGSL files.
|
/// Declares a set of benchmarks for the given function using a list of WGSL files.
|
||||||
#define TINT_BENCHMARK_WGSL_PROGRAMS(FUNC) \
|
#define TINT_BENCHMARK_WGSL_PROGRAMS(FUNC) \
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "animometer.wgsl"); \
|
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "atan2-const-eval.wgsl"); \
|
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "atan2-const-eval.wgsl"); \
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "bloom-vertical-blur.wgsl"); \
|
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "cluster-lights.wgsl"); \
|
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "cluster-lights.wgsl"); \
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "empty.wgsl"); \
|
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "metaball-isosurface.wgsl"); \
|
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "metaball-isosurface.wgsl"); \
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "particles.wgsl"); \
|
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "particles.wgsl"); \
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "shadow-fragment.wgsl"); \
|
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "shadow-fragment.wgsl"); \
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "simple-compute.wgsl"); \
|
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "simple-fragment.wgsl"); \
|
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "simple-vertex.wgsl"); \
|
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "skinned-shadowed-pbr-fragment.wgsl"); \
|
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "skinned-shadowed-pbr-fragment.wgsl"); \
|
||||||
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "skinned-shadowed-pbr-vertex.wgsl"); \
|
TINT_BENCHMARK_WGSL_PROGRAM(FUNC, "skinned-shadowed-pbr-vertex.wgsl"); \
|
||||||
TINT_BENCHMARK_EXTERNAL_WGSL_PROGRAMS(FUNC)
|
TINT_BENCHMARK_EXTERNAL_WGSL_PROGRAMS(FUNC)
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
struct Time {
|
|
||||||
value : f32,
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Uniforms {
|
|
||||||
scale : f32,
|
|
||||||
offsetX : f32,
|
|
||||||
offsetY : f32,
|
|
||||||
scalar : f32,
|
|
||||||
scalarOffset : f32,
|
|
||||||
}
|
|
||||||
|
|
||||||
@binding(0) @group(0) var<uniform> time : Time;
|
|
||||||
|
|
||||||
@binding(1) @group(0) var<uniform> uniforms : Uniforms;
|
|
||||||
|
|
||||||
struct VertexOutput {
|
|
||||||
@builtin(position)
|
|
||||||
Position : vec4<f32>,
|
|
||||||
@location(0)
|
|
||||||
v_color : vec4<f32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
@vertex
|
|
||||||
fn vert_main(@location(0) position : vec4<f32>, @location(1) color : vec4<f32>) -> VertexOutput {
|
|
||||||
var fade : f32 = ((uniforms.scalarOffset + ((time.value * uniforms.scalar) / 10.0)) % 1.0);
|
|
||||||
if ((fade < 0.5)) {
|
|
||||||
fade = (fade * 2.0);
|
|
||||||
} else {
|
|
||||||
fade = ((1.0 - fade) * 2.0);
|
|
||||||
}
|
|
||||||
var xpos : f32 = (position.x * uniforms.scale);
|
|
||||||
var ypos : f32 = (position.y * uniforms.scale);
|
|
||||||
var angle : f32 = ((3.141590118 * 2.0) * fade);
|
|
||||||
var xrot : f32 = ((xpos * cos(angle)) - (ypos * sin(angle)));
|
|
||||||
var yrot : f32 = ((xpos * sin(angle)) + (ypos * cos(angle)));
|
|
||||||
xpos = (xrot + uniforms.offsetX);
|
|
||||||
ypos = (yrot + uniforms.offsetY);
|
|
||||||
var output : VertexOutput;
|
|
||||||
output.v_color = (vec4<f32>(fade, (1.0 - fade), 0.0, 1.0) + color);
|
|
||||||
output.Position = vec4<f32>(xpos, ypos, 0.0, 1.0);
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
@fragment
|
|
||||||
fn frag_main(@location(0) v_color : vec4<f32>) -> @location(0) vec4<f32> {
|
|
||||||
return v_color;
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
const bloomDir = vec2(0.0, 1.0);
|
|
||||||
|
|
||||||
var<private> offsets : array<f32, 3> = array<f32, 3>(0.0, 1.384615421, 3.230769157);
|
|
||||||
|
|
||||||
var<private> weights : array<f32, 3> = array<f32, 3>(0.227027029, 0.31621623, 0.07027027);
|
|
||||||
|
|
||||||
struct BloomUniforms {
|
|
||||||
radius : f32,
|
|
||||||
dim : f32,
|
|
||||||
}
|
|
||||||
|
|
||||||
@group(0) @binding(0) var<uniform> bloom : BloomUniforms;
|
|
||||||
|
|
||||||
@group(0) @binding(1) var bloomTexture : texture_2d<f32>;
|
|
||||||
|
|
||||||
@group(0) @binding(2) var bloomSampler : sampler;
|
|
||||||
|
|
||||||
struct FragmentInput {
|
|
||||||
@location(0)
|
|
||||||
texCoord : vec2<f32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
fn getGaussianBlur(texCoord : vec2<f32>) -> vec4<f32> {
|
|
||||||
let texelRadius = (vec2(bloom.radius) / vec2<f32>(textureDimensions(bloomTexture)));
|
|
||||||
let step = (bloomDir * texelRadius);
|
|
||||||
var sum = vec4(0.0);
|
|
||||||
sum = (sum + (textureSample(bloomTexture, bloomSampler, texCoord) * weights[0]));
|
|
||||||
sum = (sum + (textureSample(bloomTexture, bloomSampler, (texCoord + (step * 1.0))) * weights[1]));
|
|
||||||
sum = (sum + (textureSample(bloomTexture, bloomSampler, (texCoord - (step * 1.0))) * weights[1]));
|
|
||||||
sum = (sum + (textureSample(bloomTexture, bloomSampler, (texCoord + (step * 2.0))) * weights[2]));
|
|
||||||
sum = (sum + (textureSample(bloomTexture, bloomSampler, (texCoord - (step * 2.0))) * weights[2]));
|
|
||||||
return vec4(sum.rgb, 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@group(0) @binding(3) var prevTexture : texture_2d<f32>;
|
|
||||||
|
|
||||||
@fragment
|
|
||||||
fn fragmentMain(input : FragmentInput) -> @location(0) vec4<f32> {
|
|
||||||
let blurColor = getGaussianBlur(input.texCoord);
|
|
||||||
let dimColor = (textureSample(prevTexture, bloomSampler, input.texCoord) * bloom.dim);
|
|
||||||
return (blurColor + dimColor);
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
struct SB {
|
|
||||||
data : array<i32>,
|
|
||||||
};
|
|
||||||
|
|
||||||
@group(0) @binding(0) var<storage, read_write> buffer : SB;
|
|
||||||
|
|
||||||
@compute @workgroup_size(1, 2, 3)
|
|
||||||
fn main(@builtin(global_invocation_id) id : vec3<u32>) {
|
|
||||||
buffer.data[id.x] = buffer.data[id.x] + 1;
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
struct Input {
|
|
||||||
@location(0) color: vec4<f32>,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Output {
|
|
||||||
@location(0) color: vec4<f32>,
|
|
||||||
};
|
|
||||||
|
|
||||||
@fragment
|
|
||||||
fn main(in : Input) -> Output {
|
|
||||||
return Output(in.color);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
struct Input {
|
|
||||||
@location(0) position: vec4<f32>,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Output {
|
|
||||||
@builtin(position) position : vec4<f32>,
|
|
||||||
};
|
|
||||||
|
|
||||||
@vertex
|
|
||||||
fn main(in : Input) -> Output {
|
|
||||||
return Output(in.position);
|
|
||||||
}
|
|
Loading…
Reference in New Issue