Age | Commit message (Collapse) | Author |
|
|
|
Old implementation has a single parser of many different
formats. With the introduction of Vulkan this would lead
to another parser in the same function. This patch
separates the log parsing using a visitor pattern so the
log parsing can be configured per GPU backend or even
per driver.
With Vulkan we manage the compiler our self so the parsing
will become more straight forward. The OpenGL part depends
on many factors (OS, Driver) and perhaps even GPU.
|
|
Current compiler log parser is to complex to follow. Moving it to its
own compile unit before refactoring.
|
|
Adding compiler test (does it compile?) test for all builtin shaders.
|
|
Current index builder is designed to be used in a single thread.
This makes all index buffer extractions single threaded.
This patch adds a thread safe solution enabling multithreaded
building of index buffers.
To reduce locking the solution would provide a task/thread local
index buffer builder (called sub builder).
When a thread is finished this thread local index buffer builder
can be joined with the initial index buffer builder.
`GPU_indexbuf_subbuilder_init`: Initialized a sub builder. The
index list is shared between the parent and sub buffer, but the
counters are localized. Ensuring that updating counters would
not need any locking.
`GPU_indexbuf_subbuilder_finish`: merge the information of the
sub builder back to the parent builder. Needs to be invoked outside
the worker thread, or when sure that all worker threads have been
finished. Internal the function is not thread safe.
For testing purposes the extract_points extractor has been migrated to
the new API. Herefore changes to the mesh extractor were needed.
* When creating tasks, the task number of current task is stored in
ExtractTaskData including the total number of tasks.
* Adding two functions in `MeshExtract`.
** `task_init` will initialize the task specific userdata.
** `task_finish` should merge back the task specific userdata back.
* adding task_id parameter to the iteration functions so they can
access the correct task data without any need for locking.
There is no noticeable change in end user performance.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11499
|
|
With the compute pipeline calculation can be offloaded to the GPU.
This patch only adds the framework for compute. So no changes for users at
this moment.
NOTE: As this is an OpenGL4.3 feature it must always have a fallback.
Use `GPU_compute_shader_support` to check if compute pipeline can be used.
Check `gpu_shader_compute*` test cases for usage.
This patch also adds support for shader storage buffer objects and device only
vertex/index buffers.
An alternative that had been discussed was adding this to the `GPUBatch`, this
was eventually not chosen as it would lead to more code when used as part of a
shading group. The idea is that we add an `eDRWCommandType` in the near
future.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D10913
|
|
This patch adds wavelength node support to Eevee, similar to how
Eevee Blackbody node works, thus it is a little off from Cycles.
Reviewed By: #eevee_viewport, fclem, brecht
Differential Revision: https://developer.blender.org/D11326
|
|
Added in rB7cef01b090c4c2d2703274edb91886ae37d3ce82
and rB87bfa2b207b90b5e34ebd835a23c2a82afbed878
Reviewed by: jbakker, #platform_macos
Differential Revision: https://developer.blender.org/D11012
|
|
|
|
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the
render pass tab and used in shader materials. Both Object and World based
shaders are supported. The AOV can be previewed in the viewport using the
renderpass selector in the shading popover.
AOV names that conflict with other AOVs are automatically corrected. AOV
conflicts with render passes get a warning icon. The reason behind this is that
changing render engines/passes can change the conflict, but you might not notice
it. Changing this automatically would also make the materials incorrect, so best
to leave this to the user.
**Implementation**
The patch adds a copies the AOV structures of Cycles into Blender. The goal is
that the Cycles will use Blenders AOV defintions. In the Blender kernel
(`layer.c`) the logic of these structures are implemented.
The GLSL shader of any GPUMaterial can hold multiple outputs (the main output
and the AOV outputs) based on the renderPassUBO the right output is selected.
This selection uses an hash that encodes the AOV structure. The full AOV needed
to be encoded when actually drawing the material pass as the AOV type changes
the behavior of the AOV. This isn't known yet when the GLSL is compiled.
**Future Developments**
* The AOV definitions in the render layer panel isn't shared with Cycles.
Cycles should be migrated to use the same viewlayer aovs. During a previous
attempt this failed as the AOV validation in cycles and in Blender have
implementation differences what made it crash when an aov name was invalid.
This could be fixed by extending the external render engine API.
* Add support to Cycles to render AOVs in the 3d viewport.
* Use a drop down list for selecting AOVs in the AOV Output node.
* Give user feedback when multiple AOV output nodes with the same AOV name
exists in the same shader.
* Fix viewing single channel images in the image editor [T83314]
* Reduce viewport render time by only render needed draw passes. [T83316]
Reviewed By: Brecht van Lommel, Clément Foucault
Differential Revision: https://developer.blender.org/D7010
|
|
These fill shaders were used with the old draw engine.
|
|
This removes the escape color control caracters when the output
does not supports it (i.e: file output, windows cmd).
|
|
|
|
|
|
Debug groups makes it easier to view from where an error comes from.
The backend can also implement its own callback to make it easier to
follow the API call structure in frame debuggers.
|
|
|
|
|
|
This is to improve debugging on older hardware that may not support
4.3 debug capabilities (like Macs).
This avoids sprinkling glGetErrors manually. This might still be needed
to find the root cause since not all functions are covered.
This overrides the functions pointers that GLEW have already init.
This is only enabled if using --debug-gpu option and the debug extension
are not available.
This also cleanup the usage of GLContext::debug_layer_support and use
wrapper to set object labels.
|
|
The draw manager test case initialized ghost, gpu and draw manager. This
change splits the base test case to GPU specific and draw manager
specific test case.
The GPU test base test case will be used for low level GPU tests.
|
|
This is part of the Vulkan task T68990.
This introduce a new GLQueryPool for managing queries in an
implementation agnostic manner.
This modify the GPU selection query to use this new object.
This also make use of blender::Vector for better code quality.
No real functionnal change.
|
|
This makes more sense as this module has more to it than just
GL extensions.
|
|
This is part of the Vulkan task T68990.
This commits changes a few things:
- Rename extensions to capabilities (but left the file name untouched).
- Cubemap mip render workaround detection is rewritten using gl
commands to avoid using the GPU API before initialization.
- Put all the capabilities that are only relevant for the GL backend
inside GLContext as static variables.
- Cleanup the names of the limit variables.
- Separate all GL related workaround search inside the GL module.
|
|
Part of the vulkan implementation T68990.
Pretty straight forward. Just move the GL code inside the GLBackend and
make the GPUPlatformGlobal a class object.
|
|
to avoid more typecasts.
|
|
This is just a cleanup to isolate the internals of the vertbuf.
This adds some getters to avoid refactor of existing code.
|
|
This is part of the Vulkan backend task T68990.
There is no real change, only making some code re-organisation.
This also make the IndexBuf completely abstract from outside the
GPU module.
|
|
Makes it follow the functions names.
|
|
|
|
Now the callbacks are setup for each debug context.
The formating has been reworked to be less verbose and make errors
and warnings stand out from the notifications.
Errors are most of the time sufficiently explicit in their message.
This also remove the support for AMD_debug_output which is 10 years old.
This is related to the Vulkan port T68990.
|
|
|
|
This is part of the Vulkan backend task T68990.
This is mostly a cleanup, however, there is a small change:
We don't use a special Vertex Array binding function for Immediate
anymore and just reuse the one for batches.
This might create a bit more state changes but this could be fixed
easily if it causes perf regression.
# Conflicts:
# source/blender/gpu/intern/gpu_context.cc
|
|
This is related to the Vulkan port T68990.
This is a full cleanup of the Framebuffer module and a separation
of OpenGL related functions.
There is some changes with how the default framebuffers are handled.
Now the default framebuffers are individually wrapped inside special
GLFrameBuffers. This make it easier to keep track of the currently bound
framebuffer state and have some specificity for operations on these
framebuffers.
Another change is dropping the optimisation of only configuring the
changed attachements during framebuffers update. This does not give
any benefits and add some complexity to the code. This might be brought
back if it has a performance impact on some systems.
This also adds support for naming framebuffers but it is currently not
used.
|
|
This is in preparation of the Framebuffer GL backend.
This is a just changing types and moving some code.
No logic is changed... almost... it just removes the context attach.
i.e: `gpu_context_add/remove_framebuffer()`
This is not needed for now and was even disabled in release.
This is part of T68990.
|
|
This is in preparation of vulkan backend. We move all opengl
functionnalities behind an abstract class.
This also cleansup the "dynamic" ubo create and rename it to
`GPU_uniformbuf_from_list()`
Contains, no functional change.
Part of T68990 Vulkan support.
|
|
This follows the GPU module naming of other buffers.
We pass name to distinguish each GPUUniformBuf in debug mode.
Also remove DRW_uniform_buffer interface.
|
|
|
|
This is just the backend work. It is not plugged in yet because it
needs more external cleanup/refactor.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
This just set a global object responsible for allocating new objects
in a thread safe way without needing any GPUContext bound to this
thread.
This also introduce the GLContext which will contain all the GL related
functions for the current context.
|
|
|
|
|
|
|
|
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code
complexity and duplication.
- split bsdf_common_lib.glsl into multiple sub library which are now shared
with other engines.
- the surface shader code is now more organised and have its own files.
- change default world to use a material nodetree and make lookdev shader
more clear.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D8306
|
|
|
|
This is in order to disolve GPU_draw.h into more meaningful code blocks.
All the Image related function are in `image_gpu.c`.
All the MovieClip related function are in `movieclip.c`.
The IMB module now has a connection with GPU. This is not strickly
necessary and the code could be move to `image_gpu.c` if needed.
The Image garbage collection is also ported to `image_gpu.c`.
|