summaryrefslogtreecommitdiff
path: root/gsk/gskglshader.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix spelling errorsMatthias Clasen2022-11-171-1/+1
| | | | These were pointed out by codespell.
* glshader: Add preconditionsMatthias Clasen2022-07-151-0/+7
| | | | | Add preconditions to many of the glshader uniform apis.
* Remove all nicks and blurbs from param specsSophie Herold2022-05-111-6/+2
| | | | | | | | Those property features don't seem to be in use anywhere. They are redundant since the docs cover the same information and more. They also created unnecessary translation work. Closes #4904
* docs: CosmeticsMatthias Clasen2021-10-181-1/+1
| | | | Do a round of "the the" removal.
* Rename ngl to glMatthias Clasen2021-10-071-3/+3
| | | | | We have only one gl renderer now, and it is a bit odd for it not be called gl.
* gsk: Drop the gl rendererMatthias Clasen2021-08-201-4/+1
| | | | | | ngl supports all the same platforms as gl now, and has seen more improvements in the last cycle.
* gsk: Clean up docs syntaxMatthias Clasen2021-05-221-1/+1
| | | | Replace leftover gtk-doc syntax (#Type) with backquotes.
* docs: Reduce redundancyMatthias Clasen2021-05-201-2/+1
| | | | | | | | Remove a boatload of "or %NULL" from nullable parameters and return values. gi-docgen generates suitable text from the annotation that we don't need to duplicate. This adds a few missing nullable annotations too.
* glshader: Add property annotationsMatthias Clasen2021-03-111-11/+9
| | | | Connect properties, getters, and setters with annotations
* docs: Improve gsk docsMatthias Clasen2021-03-111-87/+110
| | | | | Convert link formats, add summaries, and make a few missing things show up in the docs.
* gsk: add OpenGL based GskNglRendererChristian Hergert2021-02-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary goal here was to cleanup the current GL renderer to make maintenance easier going forward. Furthermore, it tracks state to allow us to implement more advanced renderer features going forward. Reordering This renderer will reorder batches by render target to reduce the number of times render targets are changed. In the future, we could also reorder by program within the render target if we can determine that vertices do not overlap. Uniform Snapshots To allow for reordering of batches all uniforms need to be tracked for the programs. This allows us to create the full uniform state when the batch has been moved into a new position. Some care was taken as it can be performance sensitive. Attachment Snapshots Similar to uniform snapshots, we need to know all of the texture attachments so that we can rebind them when necessary. Render Jobs To help isolate the process of creating GL commands from the renderer abstraction a render job abstraction was added. This could be extended in the future if we decided to do tiling. Command Queue Render jobs create batches using the command queue. The command queue will snapshot uniform and attachment state so that it can reorder batches right before executing them. Currently, the only reordering done is to ensure that we only visit each render target once. We could extend this by tracking vertices, attachments, and others. This code currently uses an inline array helper to reduce overhead from GArray which was showing up on profiles. It could be changed to use GdkArray without too much work, but had roughly double the instructions. Cycle counts have not yet been determined. GLSL Programs This was simplified to use XMACROS so that we can just extend one file (gskglprograms.defs) instead of multiple places. The programs are added as fields in the driver for easy access. Driver The driver manages textures, render targets, access to atlases, programs, and more. There is one driver per display, by using the shared GL context. Some work could be done here to batch uploads so that we make fewer calls to upload when sending icon theme data to the GPU. We'd need to keep a copy of the atlas data for such purposes.
* gsk: doc fixupsMatthias Clasen2020-11-301-1/+1
|
* gsk: Fix a doc oversightMatthias Clasen2020-11-171-1/+1
|
* gsk: Fix some docs oversightsMatthias Clasen2020-11-161-3/+3
| | | | | These apis have been renamed a few times, and the docs haven't kept up.
* gl renderer: Fix private function nameTimm Bäder2020-10-141-2/+2
| | | | It's a GskGLRenderer, not a GskGLRender
* gsk: Add some more shader docsMatthias Clasen2020-09-291-137/+148
| | | | | | | Do a pass over the docs and address minor inconsistencies, cosmetics and formatting differences. Mention GSK_DEBUG=shaders.
* Add GskGLShaderNode and GskGLShaderAlexander Larsson2020-09-291-0/+1394
A GskGLShader is an abstraction of a GLSL fragment shader that can produce pixel values given inputs: * N (currently max 4) textures * Current arguments for the shader uniform Uniform types are: float,(u)int,bool,vec234) There is also a builder for the uniform arguments which are passed around as immutable GBytes in the built form. A GskGLShaderNode is a render node that renders a GskGLShader inside a specified rectangular bounds. It renders its child nodes as textures and passes those as texture arguments to the shader. You also pass it a uniform arguments object.