GPU: Refactor API for Clearing Storage Buffers #105521
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Depends on
#105560 Eevee-next: Use compute shader to clear clipmaps
blender/blender
Reference: blender/blender#105521
Loading…
Reference in New Issue
No description provided.
Delete Branch "Jeroen-Bakker/blender:gpu-storage-buffer-clear-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The previous API for clearing storage buffers was following the OpenGL
api. OpenGL has many options to support for data conversions, striding
and sizzling. Metal and Vulkan don't have these features and we have to
deal it ourselves.
Blender internally only uses a tiny subset for what is possible in
OpenGL. Making the current API to difficult to implement on our future
platforms as we had to implement all cases, most even not used at all.
By changing the API we make future development easier as we only need
to implement what we are actually using.
New API
GPU_storagebuf_clear(GPUStorageBuf* ssbo, uint32_t clear_value)
Related issue: #105492
Currently this fails rendering eevee-next shadows. On linux the OpenGL raises an GL_INVALID_OPERATION.
GL_INVALID_OPERATION in glClearNamedBufferData(integer vs non-integer)
.Eevee-next shadows not working
@ -234,3 +234,3 @@
tiles_tx_.acquire(tiles_extent, GPU_RGBA16F);
GPU_storagebuf_clear_to_zero(tile_indirection_buf_);
tile_indirection_buf_.clear_to_zero();
Apply to main directly (if fine by @fclem )
@ -835,3 +835,3 @@
union {
ShadowTileMapClip clip;
int4 i;
uint4 i;
Partially revert this change.
@ -48,0 +47,4 @@
*
* NOTE: clear_data_len must be in range 1 to 4 (inclusive).
*/
void GPU_storagebuf_clear_uint(GPUStorageBuf *ssbo, uint32_t *clear_data, uint8_t clear_data_len);
There is no reason to
clear_data_len
auint8_t
. Just make it aint
type.@ -124,2 +124,4 @@
}
GLenum internal_format = GL_R32UI;
GLenum format = GL_RED;
You forgot to change this.
GPU: Refactor API for Clearing Storage Buffers.to GPU: Refactor API for Clearing Storage BuffersGPU: Refactor API for Clearing Storage Buffersto WIP: GPU: Refactor API for Clearing Storage BuffersWIP: GPU: Refactor API for Clearing Storage Buffersto GPU: Refactor API for Clearing Storage BuffersJeroen Bakker referenced this pull request2023-03-08 15:05:00 +01:00