Commit Graph

5 Commits

Author SHA1 Message Date
Clément Foucault
8ac5940e33 GPU: Add GL_ARB_clip_control support to the GL backend
This adds support for the extension and always
set the clip state value to 0..1 to align with vulkan
and metal. Moreover this is needed for the Reverse Z
implementation.

Note that this is a OpenGL 4.5 feature and is not
required to start Blender. So there must still be
a fallback path for now.

Rel #138898

Pull Request: https://projects.blender.org/blender/blender/pulls/138941
2025-05-16 13:53:36 +02:00
Sergey Sharybin
806a633609 GPU: Implement blending mode for piercing a hole in alpha
The use-case of this blend mode is to be able to make parts of an
viewport overlay transparent.

The future user of this blend mode is sequencer preview drawing
where frame will be drawn to an HDR render frame-buffer, and overlays
drawn on-top. In a way it is similar to the image engine, but without
need to have custom shader.

Ref #138094

Pull Request: https://projects.blender.org/blender/blender/pulls/138307
2025-05-02 10:40:23 +02:00
Jeroen Bakker
d4986be082 Fix #138088: Anti-aliasing issues in Metal and Vulkan
Metal and Vulkan don't support line smoothing. There is a workaround
implemented. This workaround is only enabled when linesmooth value is
larger than 1. However When using smooth lines it should also be used.

This is fixed by adding a `GPU_line_smooth_get` function for getting the
current line smooth state.

Pull Request: https://projects.blender.org/blender/blender/pulls/138123
2025-04-29 12:32:31 +02:00
Omar Emara
0b1dc351e4 Fix: eGPUBarrier enum negate operator is broken
The ENUM_OPERATORS macro for the eGPUBarrier enum uses
GPU_BARRIER_UNIFORM as its maximum value, while it should be
GPU_BARRIER_BUFFER_UPDATE instead.
2024-04-01 16:14:23 +02:00
Hans Goudey
8b514bccd1 Cleanup: Move remaining GPU headers to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/119807
2024-03-23 01:24:18 +01:00