Commit Graph

14 Commits

Author SHA1 Message Date
Elias Naur 7286b075e2 internal/cmd/convertshaders: use wine for running the HLSL compiler
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-02-10 21:57:57 +01:00
Elias Naur 269e7e0d7b internal/cmd/convertshaders: add support for compute shaders
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-12-31 17:21:35 +01:00
Egon Elbre f00f3a3359 gpu: add linear gradient
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
2020-11-03 15:39:06 +01:00
Elias Naur b194a0ce58 internal/cmd/convertshaders: target 9.1 compatibility shader model
Direct3D 11 supports Direct3D 9.1 level hardware, but only if the shaders are
compiled for target 4_0_level_9_1.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-28 15:22:58 +01:00
Elias Naur 1d3a9fb2d6 internal/cmd/convertshaders: replace fxc.exe with D3DCompile
D3DCompile successfully compiles shaders fxc.exe doesn't. As a bonus
the DirectX SDK is no longer required (it includes fxc.exe).

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-28 15:14:54 +01:00
Elias Naur d65bfdc275 internal/cmd/convertshaders: use gofmt to format output
In particular, the simplifying "-s" flag to gofmt ensures that the automatic
test for unformatted Go source files won't complain.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:41:31 +01:00
Elias Naur 3043c4243a gpu/backend: add support for GLSL 1.50
Apple's OpenGL 3.2 Core implementation doesn't accept 1.30.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:22:59 +01:00
Elias Naur dd6a247326 gpu/backend: add support for desktop OpenGL 3
In particular, add the GLSL 1.30 shader variant. Sigh.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:22:59 +01:00
Elias Naur 1f117d8de0 internal/cmd/convertshaders: #define HLSL when compiling for HLSL
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:22:59 +01:00
Elias Naur 0d573514c5 internal/cmd/convertshaders: support #include in shaders
Add flag to specify shader directory while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:22:59 +01:00
Elias Naur 29d36e11ee gpu/shaders: use correct type for integer vector
OpenGL supports casting from int to float during vertex array
reading. Direct3D doesn't. Since we're transpiling from GLSL, we can't
directly use the Direct3D builtin "asint". So that leaves using
"ivec2" instead of vec2.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:22:59 +01:00
Elias Naur 0d266c413d gpu,gpu/backend: implement GLSL 300 es shader variants
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 20:34:58 +01:00
Elias Naur 0be4dd9af0 app/internal/cmd/convertshaders: use backend types directly
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 20:34:22 +01:00
Elias Naur fd61c226d4 internal/cmd/convertshaders: move shader converter to separate package
To use the converter from other packages, make the converter a
runnable command.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 20:34:22 +01:00