Created
October 17, 2021 00:24
-
-
Save cwfitzgerald/d538f8f488b5a4da6b479c2c3709d892 to your computer and use it in GitHub Desktop.
graphite's list of nv shader recompily
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Things that trigger shader recompiles on NVIDIA GL | |
* Respecifying input assembly via `glVertexAttrib*` for any vertex array | |
* Clearing an individual color attachment with `glClearBuffer*` | |
* Clearing an FBO with `glClear` without specifying all attachments in | |
the clear, e.g if the FBO has color + depth but you only pass `GL_COLOR_BUFFER_BIT` | |
* Attaching shaders to a program | |
* Changing sampler uniforms (all textures are bindless on NV, changing sampler index is bad) | |
* Respecifying `glClearColor` more than once per frame per FBO | |
* Changing depth function more than once per bound program | |
* Changing stencil function more than once per bound program | |
* Changing face winding order for backface culling more than once per bound program | |
* Changing blend equation more than once per bound program (blend func is safe to change) | |
* Changing blend color more than once per bound program | |
* Changing color write mask more than once per bound program | |
* Adding or removing attachments from an FBO | |
* Changing texture parameters more than once per bound program per sampler, | |
excluding texture filtering options (aniso, min/mag is fine, but texture border, border color, wrapping mode/behavior triggers recompile) | |
* Switching between indexed and non-indexed draws per bound program | |
* Writing to gl_FragDepth | |
* Using discard in a shader | |
* Updating a UBO that doesn't use layout std140 | |
* Exceeding too many uniform updates per program (16KiB on GL 3.x) | |
* Respecifying shader outputs with `glBindFragDataLocation` or `glBindFragDataLocationIndexed` | |
* Using `early_fragment_test` layout in any shader (each draw call forces a recompile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment