Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-18GPU: Add support for stencil buffer texturing mode.Clément Foucault
This adds the possibility to read the stencil buffer inside shaders. This is only available on GL 4.3 so use it accordingly.
2022-03-18GPU/GL: Add StorageBuf implementationClément Foucault
Almost 1:1 identical to UniformBuf implementation.
2022-02-25GPUTexture: Use immutable storageClément Foucault
This means textures need to have the number of mipmap levels specified upfront. It does not mean the data is immutable. There is fallback code for OpenGL < 4.2. Immutable storage will enables texture views in the future.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-01GPUShader: Add support for gpu_BaryCoord and fallbackClément Foucault
This adds the possibility to use the `gpu_BaryCoord[NoPersp]` builtin to support barycentric coordinates without geometry shader. The `BuiltinBits::LAYER` builtin needs to be manually added to the `GPUShaderCreateInfo` in order to use this feature. Note: This is only available for shaders using `GPUShaderCreateInfo`. A geometry shader fallback is generated if the extension `AMD_shader_explicit_vertex_parameter` is not available. `NV_fragment_shader_barycentric` was not considered because it is not present inside the `glew.h` with use and seems to only be available with vulkan.
2022-02-01GPUShader: Add support for vertex shader gl_Layer and fallbackClément Foucault
This adds the possibility to use the `gpu_Layer` builtin to support layered rendering without geometry shader. The `BuiltinBits::LAYER` builtin needs to be manually added to the `GPUShaderCreateInfo` in order to use this feature. Note: This is only available for shaders using `GPUShaderCreateInfo`. A geometry shader fallback is generated if the extension `AMD_shader_explicit_vertex_parameter` is not available.
2022-01-19GPUShaderCreateInfo: Rework geometry shader layout supportClément Foucault
This merge the description into one struct only that can be more easily copied during `finalize()`. The in and out layout parameters are better named and extended with the invocation count (with fallback support)
2022-01-17Revert "Revert "GPUShaderCreateInfo for interface abstraction""Jeroen Bakker
This reverts commit edee5a947b7ea3e1324aa334a22c7c9bbf47f5f7. Fixes compilation error (Missing file BLI_float2.hh)
2022-01-17Revert "GPUShaderCreateInfo for interface abstraction"Jeroen Bakker
This reverts commit 8fb2ff458ba579dba08bfdf57d043ad158b5db07. Missing some files.
2022-01-17GPUShaderCreateInfo for interface abstractionJeroen Bakker
This is a first part of the Shader Create Info system could be. A shader create info provides a way to define shader structure, resources and interfaces. This makes for a quick way to provide backend agnostic binding informations while also making shader variations easy to declare. - Clear source input (only one file). Cleans up the GPU api since we can create a shader from one descriptor - Resources and interfaces are generated by the backend (much simpler than parsing). - Bindings are explicit from position in the array. - GPUShaderInterface becomes a trivial translation of enums and string copy. - No external dependency to third party lib. - Cleaner code, less fragmentation of resources in several libs. - Easy to modify / extend at runtime. - no parser involve, very easy to code. - Does not hold any data, can be static and kept on disc. - Could hold precompiled bytecode for static shaders. This also includes a new global dependency system. GLSL shaders can include other sources by using #pragma BLENDER_REQUIRE(...). This patch already migrated several builtin shaders. Other shaders should be migrated one at a time, and could be done inside master. There is a new compile directive `WITH_GPU_SHADER_BUILDER` this is an optional directive for linting shaders to increase turn around time. What is remaining: - pyGPU API {T94975} - Migration of other shaders. This could be a community effort. Reviewed By: jbakker Maniphest Tasks: T94975 Differential Revision: https://developer.blender.org/D13360
2022-01-06Cleanup: Clang-tidy: modernize-redundant-void-argAaron Carlisle
2021-12-09Cleanup: move public doc-strings into headers for 'gpu'Campbell Barton
Ref T92709
2021-11-20Fix T92090: Eevee crash with Intel HD 4000 and macOS 10.15.7Brecht Van Lommel
A recent security update to macOS 10.15.7 causes crashes when using Eevee and various other 3D viewport features. It appears that glGenerateMipmap is broken, causing a crash whenever its commands are flushed/submitted to the GPU. Ideally this would be fixed in a driver update, however it's unlikely this will happen. Earlier macOS versions have been receiving security updates for 2 years, and that window has just passed for 10.15. Further, computers with these GPUs can't upgrade to a newer macOS version. As a workaround, disable mipmaps on these GPUs, by setting the mipmap max level to 0 and not calling glGenerateMipmaps. Effects like depth of field also use mipmaps, but fill in the mip levels by other means. In those cases we keep the mipmap level. Differential Revision: https://developer.blender.org/D13295
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2020-09-14Cleanup: GPUDebug: Use Vector instead of custom stackClément Foucault
2020-09-14GL: Make use of the new debug layerClément Foucault
This makes replay analysis inside renderdoc much easier by using the new debug group functionality.
2020-09-12GPU: Add Image Load Store extension supportClément Foucault
This wraps the functionality used to speedup EEVEE volumetrics. This touches the rendering code of EEVEE as it should fix a mis-usage of the GL barrier. The barrier changed type and location, removing an unused barrier.
2020-09-10GL: Wrap extension support inside GLContextClément Foucault
This makes it possible to disable all the extensions when forcing workarounds. Also it will allow future options to selectively disable each extension to know which one is buggy.
2020-09-10GL: Add fallback debug layerClément Foucault
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.
2020-09-09Cleanup: GPU: Replace multiple checks by GLContext::debug_layer_supportClément Foucault
2020-09-08GLContext: Fix clang warning about using overrideClément
2020-09-08GPUContext: Move GPUContext to gpu::Context for more consistencyClément Foucault
This makes the GPUContext follow the same naming convention as the rest of the module. Also add a static getter for extra bonus style (no need for casts): - Context::get() - GLContext::get()
2020-09-08GPUState: Encapsulate glFlush and glFinish inside the GLContextClément Foucault
Part of the Vulkan task T68990 Isolate the few remaining gl functions.
2020-09-08GPUQuery: GL Backend isolationClément Foucault
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.
2020-09-07Cleanup: GLBackend: Move buf_free and tex_free to GLContextClément Foucault
This makes it easier to follow. Also removes the GL related functions inside gpu_context.cc.
2020-09-07GPUCapabilities: Isolate GL memory statisticsClément Foucault
This is part of the Vulkan task T68990 This is a simple cleanup.
2020-09-07GPUExtensions: GL backend isolationClément Foucault
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.
2020-09-05GPUTexture: GL Backend IsolationClément Foucault
This is a massive cleanup needed for vulkan support T68990. It provides: - More meaningful enums with conversion functions. - Less hacky supports of arrays and cubemaps (all considered layered). - More inline with the stateless design of vulkan and modern GL. - Methods Fallbacks are using framebuffer functions that are wrapped instead of implementing inside the texture module. What is not in there: - API change. - Samplers support (breaks a few effects). # Conflicts: # source/blender/gpu/GPU_texture.h
2020-09-01Cleanup: GPUContext: Remove unused functionsClément Foucault
2020-09-01GPU: Move UBO binding validation to GL backendClément Foucault
This also make the validation quicker by tracking the currently bound slots.
2020-09-01GL: Move MacOS debug callback to gl_debug.ccClément Foucault
And format to use the same callback as standard debugging layer.
2020-09-01Cleanup: GPU: Remove GPU_draw_primitive and default_vao_Clément Foucault
These are not used anymore and can be replicated using the GPUBatch API.
2020-08-30Cleanup: GPUContext: Remove default_framebuffer_Clément Foucault
This is now handled by FrameBuffer wrapping.
2020-08-25GPU: Fix compilation issue caused by rBb43f4fda19b9Clément Foucault
2020-08-25GL: Add error checking functionClément Foucault
This is to ease the debugging process on Apple GL implementation.
2020-08-21GPUUniformBuf: GL backend isolationClément Foucault
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.
2020-08-13GPU: Fix MSVC warningClément Foucault
2020-08-13GPUBatch: GL backend isolationClément Foucault
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-08Cleanup: GPU: Change gpu_context_private.h to C++ only headerClément Foucault
2020-08-08GPUBackend: Add new GPUBackend object to manage GL object allocationsClément Foucault
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. # Conflicts: # source/blender/gpu/intern/gpu_context.cc
2020-08-08GPUBackend: Add new GPUBackend object to manage GL object allocationsClément Foucault
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.