mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
app/headless: add lower-level backend tests
Add a series of low level gpu.Backend tests to assure the correct behaviour of Backends. The immediate use is debugging of the Direct3D port, in the future for developing new backends. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#version 310 es
|
||||
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
precision highp float;
|
||||
|
||||
layout(location=0) in vec4 position;
|
||||
|
||||
void main() {
|
||||
gl_Position = position;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#version 310 es
|
||||
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
precision mediump float;
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
fragColor = vec4(.25, .55, .75, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#version 310 es
|
||||
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
precision highp float;
|
||||
|
||||
void main() {
|
||||
float x, y;
|
||||
if (gl_VertexIndex == 0) {
|
||||
x = 0.0;
|
||||
y = .5;
|
||||
} else if (gl_VertexIndex == 1) {
|
||||
x = .5;
|
||||
y = -.5;
|
||||
} else {
|
||||
x = -.5;
|
||||
y = -.5;
|
||||
}
|
||||
gl_Position = vec4(x, y, 0.5, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user