13b0a697a0
Cleanup: GPU: Remove GPU_draw_primitive and default_vao_
...
These are not used anymore and can be replicated using the GPUBatch API.
2020-09-01 00:30:36 +02:00
a1df2fc443
Cleanup: GPU: Remove unused attr_binding and primitive code
2020-08-31 15:15:04 +02:00
536c2e0ec9
GPUState: Only apply state before drawing
2020-08-18 21:30:10 +02:00
216d78687d
GPUShader: GL backend isolation
2020-08-18 21:30:09 +02:00
df28d2c27e
Cleanup: GPU: Replace Batch uniform by shader uniform using macro
...
This is a first step into removing uniforms from GPU_batch and Imm.
2020-08-18 21:30:09 +02:00
9762c3892e
Cleanup: spelling
2020-08-17 12:34:05 +10:00
ac60a67b3f
Cleanup: GPU: Remove Batch vao cache reset
...
This is done at drawtime automatically.
2020-08-13 14:20:24 +02:00
efc97b3919
GPUBatch: GL backend isolation
...
This changes the drawing paradigm a bit. The VAO configuration is done
JIT-style and depends on context active shader.
This is to allow more flexibility for implementations to do optimization
at lower level.
The vao cache is now its own class to isolate the concept. It is this
class that is reference by the GLContext for ownership of the containing
VAO ids.
2020-08-13 14:20:24 +02:00
47bfb0f7ad
GPUBatch: Move allocator to backend
2020-08-13 14:20:24 +02:00
9443da6166
GPUBatch: Merge phase and ownership flags and cleanup there usage
...
Also add new flags to communicate specific behavior to future backend.
2020-08-13 14:20:24 +02:00
e0f5f95e66
DRW: InstanceData: Remove hacks of batch freeing callback
...
We instead use a handle reference counter on the GPUVertBufs used by
the instancing batches. This make sure that if an update happens on the
GPUVertBuf used to contruct the batch, they will never have the same
memory address than the previously allocated ones (since they are still
pending deletion thanks to the refcounter).
This avoid the linear search to update the GPUBatch in the case a
batch is deleted (which was even a bad option since they could be only
cleared)
2020-08-13 14:20:24 +02:00
93165cbf47
GPUBatch: Remove most use of GPU_batch_draw_advanced()
...
This is in order to better encapsulate / isolate the drawing code.
2020-08-13 14:20:23 +02:00
de4eb115ac
Cleanup: GPUBatch: Remove GL functions from uniform assignment
2020-08-13 14:20:23 +02:00
b0f30bd684
Cleanup: GPUBatch: Move gpu_batch_private.h to CPP header
2020-08-13 14:20:23 +02:00
854c999d82
GPUShader: Change shader state tracking to be part of the GPUContext
...
This remove the use of batch->program and replace it with batch->shader.
This will allow GL abstraction latter.
2020-08-13 14:20:23 +02:00
186abf7d3b
GPUBatch: Remove usage of gl_prim_type outside of GPU module
2020-08-13 14:20:23 +02:00
38ef35b1ed
GPUDrawList: GL backend isolation
2020-08-13 14:20:23 +02:00
171e77c3c2
Cleanup: use array syntax for sizeof with fixed values
...
Also order sizeof(..) first to promote other values to size_t.
2020-08-08 13:38:00 +10:00
f1b1a0745f
Cleanup: GPU: Change gpu_context_private.h to C++ only header
2020-08-08 03:05:39 +02:00
0255f1e022
GPUBatch: Use custom allocator
...
This is needed for the new GPU abstraction.
2020-08-08 01:15:27 +02:00
19175f4757
GPUBatch & GPUImmediate: Use GPUShader instead of using raw OGL handle
2020-07-30 13:28:50 +02:00
959529d4b8
GPU: Move gpu_vertex_format.c to C++
2020-07-29 15:03:02 +02:00
7b4a21077a
GPU: Move gpu_batch.c to C++
2020-07-26 17:28:48 +02:00