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-22GL: Fix compilation error on MSVC (for real)Clément Foucault
2022-03-22GL: Fix compilation error on MSVCClément Foucault
2022-03-22Metal: Make GLSL shader source MSL compliant alsoJason Fielder
Metal shading language follows the C++ 14 standard and in some cases requires a greater level of explicitness than GLSL. There are also some small language differences: - Explicit type-casts (C++ requirements) - Explicit constant values (C++ requirements, e.g. floating point values using 0.0 instead of 0). - Metal/OpenGL compatibility paths - GLSL Function prototypes - Explicit accessors for vector types when sampling textures. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14378
2022-03-18GL: Add missing format in image layout conversionClément Foucault
2022-03-18GPUShaderCreateInfo: Add explicit early_fragment_testClément Foucault
2022-03-18GLShader: Fix two small issues with compute shader generated codeClément Foucault
2022-03-11Cleanup: fix source comment typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14307
2022-02-13Cleanup: Clang tidyHans Goudey
Use using instead of typedef, remove redundant string init, use "empty", address qualified auto, use nullptr.
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-07Merge branch 'blender-v3.1-release'Bastien Montagne
2022-02-07Fix UI messages (typos etc.).Bastien Montagne
2022-02-07Cleanup: spelling in commentsCampbell Barton
2022-02-04GLShader: Fix several low importance issuesClément Foucault
- Fix image.format conversion to string - Fix warnings about ARB_conservative_depth not found even if GL > 4.2 - Add `array(type)` define for portable array definition
2022-02-04Merge branch 'blender-v3.1-release'Clément Foucault
2022-02-04Workbench: Fix unreported heavily quantized mesh due to driver issueClément Foucault
Detected on `amdgpu-pro` libGL implementation. The workaround is to not use explicit location for vertex attributes. This is not a real problem as we don't rely on them for now.
2022-02-01Merge branch 'blender-v3.1-release'Clément Foucault
2022-02-01Fix T95278: Crash on startup because of GLSL recursionClément Foucault
Bypassing the defines which are only there for error checking.
2022-02-01GPUShader: Rename createInfo storage QualifiersClément Foucault
Using opt-in instead of opt-out to make code easier to read. Add combined flag enum. Making restrict an inverse flag option because it is so rare to use it.
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-31Cleanup: use our own conventions for tags in commentsCampbell Barton
2022-01-29Fix typos in rB0a8fa07735cdb89081b652c032c73863e34f8ff1Clément Foucault
2022-01-29Fix T95278: Crash on startup because of GLSL compiler bugClément Foucault
The GLSL defines used to make the uniform names unusable for local variable is being interpreted as recursive on some implementation. This avoids it by create a second macro avoiding the recursion.
2022-01-28Cleanup: Clang-tidy warning gl_shader.ccJeroen Bakker
2022-01-27GPUShaderCreateInfo: Remove push_constant indexingClément Foucault
This is too much impractical and offers no real benefit.
2022-01-26D13910: Workbench: Port shaders to use GPUShaderCreateInfoClément Foucault
Also adds a few things to GPUShader for easily create shaders. Heavy usage of macros to compose the createInfo and avoid duplications and copy paste bugs. This makes the link between the shader request functions (in workbench_shader.cc) and the actual createInfo a bit obscure since the names are composed and not searchable. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13910
2022-01-26GLShader: Fix crash caused by redundant uniform declarationClément Foucault
This slipped through during a rebase.
2022-01-25GLShader: Fix buffer overflow caused by workaround uniformClément Foucault
In order to use a workaround builtin uniform, we need to count it just like other uniforms and give it some space in the name buffer. This also fixes extensions being added after the uniform declaration. All `#extension` directives are now part of the gl backend.
2022-01-25GLShader: Fix fallback to gl_BaseInstanceClément Foucault
All `#entension` directives needs to be first before any other token. Add missing `;` after uniform declaration.
2022-01-25GPUShader: Add optionnal single shader stage interface for in and outClément Foucault
This makes optionnal the use of a different interface for the geometry shader stage output. When the vertex and geometry interface instance name matches, a `_in` and `_out` suffix is added to the end of the instance name. This makes it easier to have optional geometry shader stages. # Conflicts: # source/blender/gpu/intern/gpu_shader_create_info.hh
2022-01-25Draw: Migrate hair refine compute shader to use create info.Jeroen Bakker
This patch migrates the draw manager hair refine compute shader to use GPUShaderCreateInfo. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13915
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-19Fix T95039,T94998: Shaders compilation errors on Mac.Jeroen Bakker
Cause was incorrect logic when generating the resource layout. It the explicit_location_support setting was ignored and the binding were generated for image, uniform buffers and storage buffers.
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-03Cleanup: Clang tidyHans Goudey
2021-12-09Cleanup: move public doc-strings into headers for 'gpu'Campbell Barton
Ref T92709
2021-06-28GPU: Refactored +cleanup compilation log parsing.Jeroen Bakker
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.
2021-05-26GPU: Compute Pipeline.Jeroen Bakker
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
2020-11-30Cleanup: Clang tidy void argumentHans Goudey
2020-11-30Fix T83203 BGL: shader.program wrongly always returns 0Clément Foucault
This was a leftover from the 2.91 GPU module refactor. This is an exception that should be removed when we remove BGL.
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-11-06Cleanup: Clang-Tidy, modernize-redundant-void-argSergey Sharybin
2020-10-24GPU: Use CLOG to for debug outputClément Foucault
This removes the escape color control caracters when the output does not supports it (i.e: file output, windows cmd).
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-14Cleanup: GLShader: Use span and default constructor instead of vector(0)Clément Foucault
2020-09-14GL: Fix linking errors being useless.Clément Foucault
Now they will at least show the shader name
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.