-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct stencil upload bugs #11192
Correct stencil upload bugs #11192
Conversation
In case a buffer has been resized recently, we want to upload just the detected drawable area, probably. Before this was inconsistent depending on the render resolution.
Makes hrydgard#10634 work for GLES properly.
We write a static depth value, which will be ignored, to force the driver to support discard.
Seeing that it could be interesting to use ARM_shader_framebuffer_fetch_depth_stencil as an alternative to dual source blending (using in-shader blending replacing -[Unknown] |
I see you added a workaround by writing to depth - did layout(early_fragment_tests) do anything? |
Good catch with the semantics by the way ... oops. |
I meant we could add that to the regular drawing fragment shaders to explicitly allow early tests in cases where we don't discard. And regular drawing is probably impacted by this driver bug. -[Unknown] |
Posted the issue on their forum at least: -[Unknown] |
Oh right, forgot that it's indeed a hint the other way :) They're usually not nearly as responsive as say ARM in their forum, but good to have it reported. |
GLES was missing the semantic definitions. I guess it was just using the last ones on desktop or something. Now it works fine on mobile again.
Vulkan definitely looks like a driver bug, and it's a bug that could easily be affecting regular rendering too. I didn't test extensively but at least this case is affected:
discard;
is used in the shader.I suppose we could statically write to depth (Adreno only?) whenever we also generate a
discard
. (EDIT by hrydgard: a commit for this has now been added)If we bother detecting that case, we might put
layout(early_fragment_tests) in;
for GL4.2+/Vulkan/GLES3.1+? It might clarify some case with hardware tessellation or direct depal, etc.Fixes #10634.
-[Unknown]