Elias Naur
970fadf852
gpu/internal/driver: introduce and use FeatureSRGB
...
No functional changes; a follow-up will implement graceful fallback in
the compute renderer.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-07-29 08:37:59 +02:00
Elias Naur
b3a8c24334
gpu/internal/driver: rename TextureFormatSRGB to TextureFormatSRGBA
...
The format implies an alpha channel; name it accordingly.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-07-29 08:37:18 +02:00
Elias Naur
60a47e7de5
gpu/internal,internal/gl: add support for strided texture uploads
...
The CPU fallback of the compute renderer needs to upload subtextures
from a larger image.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-07-27 14:34:18 +02:00
Elias Naur
abfbeb87cc
gpu/internal/d3d11: stub BlitFramebuffer for D3D11
...
The compute renderer doesn't run on Windows yet, but the d3d11 backend needs
the method to satisfy the driver interface.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-07-27 14:34:18 +02:00
Elias Naur
39775f555a
gp/internal/opengl: support sRGB emulation for embedded content
...
Programs such as gio-example/glfw rely on Gio drawing blending with
the framebuffer background. This change makes it so when sRGB emulation
is active.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-05-16 18:17:00 +02:00
Elias Naur
21c319ace5
gpu/internal/opengl,internal: move sRGB emulation to OpenGL driver
...
There is only one driver but several backends (EGL, WebGL).
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-05-16 10:44:45 +02:00
Elias Naur
23e0c898ef
gpu/internal/driver: use strings for generated DXIL assembly
...
Literal strings are a more compact than literal byte slices. A future
change will switch to go:embed to save even more space.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-04-12 12:44:06 +02:00
Elias Naur
fbee13a07d
gpu/internal/convertshaders,gpu: represent converted shaders with raw literals
...
Raw strings with linebreaks are easier to read and produce smaller
diffs.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-04-12 12:43:46 +02:00
Elias Naur
86f10e33d7
internal/unsafe: get rid of SliceOf
...
Move SliceOf to the package of the only user and unexport it.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-03-11 11:20:07 +01:00
Elias Naur
57750fc8a0
gpu/headless,gpu/internal: rename "backend" files and names to "driver"
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2021-03-08 18:20:11 +01:00