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-08-30GPUTexture: Add type correct GPU_SAMPLER_MAX constant for C++Clément Foucault
This avoid having to cast when using it in `.cc` and `.hh` files.
2022-08-19Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-08-19Fix build error on mips64el architectureBrecht Van Lommel
Same as D12194, name "mips" conflicts on such systems.
2022-08-03Image: Display GPU layout in `uiTemplateImageInfo`Angus Stanton
Add IMB_gpu_get_texture_format and GPU_texture_format_description to retrieve and 'stringify' an eGPUTextureFormat. These are then used in the image info panel used in several areas across blender. New Information: {F13330937} Reviewed By: jbakker Maniphest Tasks: T99998 Differential Revision: https://developer.blender.org/D15575
2022-06-07Cleanup: spelling in comments, additional white spaceCampbell Barton
2022-05-11Cleanup: spelling in commentsCampbell Barton
Revert change from [0] that assumed UNORM was a mis-spelling of UNIFORM. [0]: 2c75857f9fc0dc5d524e4a0407e0a68856e5906e
2022-05-06Cleanup: spelling in comments, use doxygen commentsCampbell Barton
2022-04-27Metal: MTLTexture core implementation for Metal backend, with minimal ↵Clément Foucault
surrounding functionality. This covers implementation of the GPUTexture abstraction for the Metal backend, with additional utility functionality as required. Some components have been temporarily disabled pending dependencies on upcoming Metal backend components, and these will be addressed as the backend is fleshed out. One core challenge addressed in the Metal backend is the requirement for read/update routines for textures. MTLBlitCommandEncoders offer a limited range of the full functionality provided by OpenGLs texture update and read functions such that a series of compute kernels have been implemented to provide advanced functionality such as data format conversion and partial/swizzled component updates. This diff is provided in full, but if further division is required for purposes of code review, this can be done. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14543
2022-03-18GPUTexture: Add Cube view as 2D arrayClément Foucault
This is useful to read/write to the textures directly using compute shaders and imageLoad/Store.
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-18GPUTexture: Expose layer & mip countClément Foucault
2022-02-25GPUTexture: Add support for texture viewClément Foucault
This is an OpenGL 4.3 feature that enables creating a texture using a range of the same data as another texture.
2022-02-16GPUTexture: Add dimensions getterClément Foucault
Pretty straight forward. Returns the texture dimensions count. This is different from the size.
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-02Cleanup: spelling in commentsCampbell Barton
2022-01-27Fix crash on older platform due to unsupported clear commandClément Foucault
Clearing using GPU_texture_create_2d for unorm texture needs to use GPU_DATA_FLOAT to match the conversion requirements.
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-09Cleanup: move public doc-strings into headers for 'gpu'Campbell Barton
Ref T92709
2021-10-05DRW: Move buffer & temp textures & framebuffer management to DrawManagerClément Foucault
This is a necessary step for EEVEE's new arch. This moves more data to the draw manager. This makes it easier to have the render or draw engines manage their own data. This makes more sense and cleans-up what the GPUViewport holds Also rewrites the Texture pool manager to be in C++. This also move the DefaultFramebuffer/TextureList and the engine related data to a new `DRWViewData` struct. This struct manages the per view (as in stereo view) engine data. There is a bit of cleanup in the way the draw manager is setup. We now use a temporary DRWData instead of creating a dummy viewport. Development: fclem, jbakker Differential Revision: https://developer.blender.org/D11966
2021-08-17Cleanup: clang-formatCampbell Barton
2021-08-13Fix FTBFS on mips64el architectureMatteo F. Vescovi
While trying to get Blender 2.93.x LTS to build fine on all release architectures in Debian, I noticed that the misleading use of "mips" as integer variable caused problems when compiling on mips64el. The patch should fix the issue. Reviewed By: fclem Differential Revision: https://developer.blender.org/D12194
2021-04-30Cleanup: Rename `#if GPU_USE_PY_REFERENCES` to `#ifndef ↵Germano Cavalcante
GPU_NO_USE_PY_REFERENCES` This is safer for incremental build. And there was already a macro `GPU_USE_PY_REFERENCES` used elsewhere.
2021-04-30Python GPU: Add reference of PyObject GPU object to the GPU object itselfGermano Cavalcante
Instead of creating different python wrappers for the same GPU object, return the same `PyObject` created earlier. This also allows for more secure access to existing GPU objects. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11044
2021-02-21GPU: Add RGB10_A2 format supportClément Foucault
Nice format to output high definition normals or normalized colors.
2021-02-17Cleanup: Abbreviate enums with 'UNSIGNED_' in the nameGermano Cavalcante
2021-02-17Python: gpu module: add new submodules and typesGermano Cavalcante
This commit extends the gpu python API with: ``` gpu.types.Buffer #"__init__", "to_list" gpu.types.GPUTexture #"__init__", "clear", "read", "format" gpu.types.GPUFrameBuffer #"__init__", "bind", "clear", "is_bound", "viewport", ("__enter__", "__exit__" with "GPUFrameBufferStackContext") gpu.types.GPUUniformBuf #"__init__", "update" gpu.state #"blend_set", "blend_get", "depth_test_set", "depth_test_get", "depth_mask_set", "depth_mask_get", "viewport_set", "viewport_get", "line_width_set", "line_width_get", "point_size_set", "color_mask_set", "face_culling_set", "front_facing_set", "program_point_size_set" ``` Add these methods to existing objects: ``` gpu.types.GPUShader #"uniform_sample", "uniform_buffer" ``` Maniphest Tasks: T80481 Differential Revision: https://developer.blender.org/D8826
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-10-09GPU: Fix NOT ~ operator for eGPUSamplerStateAnkit Meel
The real maximum was `GPU_SAMPLER_ICON`, not `GPU_SAMPLER_REPEAT`, my bad. {rBa31a87f8943aa40} Move `GPU_SAMPLER_MAX` out of the enum since it's used as an `int` at many places. Also, the macro `ENUM_OPERATORS` needs a maximum, and this enumerator cannot be used as the argument of that macro. It creates wrong values in the `~` NOT operator. Thanks @deadpin for catching this. Reviewed By: fclem Differential Revision: https://developer.blender.org/D9157
2020-10-08T81340: UBSan: load of value .. not valid for GPU enum typeAnkit Meel
The underlying type of the enum cannot be fixed here due to its usage in C code. All the values possible in the width of the underlying type are not valid for an enum. Only 0 to (2*max - 1) if all enumerators are unsigned. So the macro asks for the biggest value among the //listed// ones. If any enumerator C is set to say `A|B`, then C would be the maximum. (2*max-1) is used as the mask. The warnings (for each enum modified in this commit): GPU_vertex_buffer.h:43:1: runtime error: load of value 4294967291 which is not a valid value for type 'GPUVertBufStatus' https://github.com/llvm/llvm-project/commit/1c2c9867 Ref T81340 Reviewed By: fclem Differential Revision: https://developer.blender.org/D9067
2020-09-15Liquid Simulation Display Options (GSoC 2020)Sriharsha Kotcharlakot
All the changes made in the branch `soc-2020-fluid-tools` are included in this patch. **Major changes:** === Viewport Display === - //Raw voxel display// or //closest (nearest-neighbor)// interpolation for displaying the underlying voxel data of the simulation grids more clearly. - An option to display //gridlines// when the slicing method is //single//. ==== Grid Display ==== - Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Manta GUI. ==== Vector Display ==== - //**M**arker **A**nd **C**ell// grid visualization options for vector grids like velocity or external forces. - Made vector display options available for external forces. ==== Coloring options for //gridlines// ==== - Range highlighting and cell filtering options for displaying the simulation grid data more precisely. - Color gridlines with flags. - Also, made slicing and interpolation options available for Volume Object. Reviewed By: JacquesLucke, sebbas Differential Revision: https://developer.blender.org/D8705
2020-09-12Fix remaining GL calls/type preventing from building due to recent cleanupClément Foucault
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-08GPU: Cleanup implementation castsClément Foucault
- Use the syntactic wrap/unwrap method to make code more readable. - Update comment about hidden struct behind opaque types. - Cleanup GPUDrawList type.
2020-09-08GPUTexture: Remove unused functions and avoid GPU_texture_opengl_bindcodeClément Foucault
This is a cleanup.
2020-09-08GPUState: Encapsulate glPixelStorei inside the GLStateManagerClément Foucault
Part of the Vulkan task T68990 Isolate the last remaining gl functions.
2020-09-07GPU: Fix clang tidy warningsClément Foucault
2020-09-05GPUTexture: Change texture creation APIClément Foucault
This is to modernize the API: - Add meaningful name to all textures (except DRW textures). - Remove unused err_out argument: only used for offscreen python. - Add mipmap count to creation functions for future changes. - Clarify the data usage in creation functions. This is a cleanup commit, there is no functional change. # Conflicts: # source/blender/gpu/GPU_texture.h
2020-09-05Cleanup: GPUTexture: Clean framebuffer attachmentClément Foucault
2020-09-05GPUTexture: Add support for samplersClément Foucault
This just add back the support. This commit also includes a bit of cleanup. # Conflicts: # source/blender/gpu/GPU_texture.h
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-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-09-02Cleanup: spelling, rename attachement -> attachmentCampbell Barton
2020-08-30GPUFrameBuffer: GL backend isolationClément Foucault
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.
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-30Cleanup: Split gpu_texture_image.c into BKE and IMB modulesClément Foucault
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`.
2020-07-29Cleanup: GPU: Move Image based function to GPU_draw.hClément Foucault
This makes it less confusing what functions are for blender structures.
2020-07-29GPU: Refactor gpu_texture_image to not use GL callsClément Foucault
This is also a bit of code cleanup, reorganisation. Tried to be DRYed but avoid too much code change to (hopefully) minimize breakage. - GPU: remove TEXTARGET_CUBE_MAP, this is no longer used in the codebase. - GPUTexture: Move compressed texture upload to gpu_texture.cc - GPUTexture: Add per texture Anisotropic filtering switch
2020-07-29GPU: Move gpu_texture.c to C++Clément Foucault
# Conflicts: # source/blender/gpu/GPU_texture.h