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
2019-07-31Fix T67951: Bone selection is broken on some Intel GPUsmano-wii
The problem is that the `glDrawArraysInstancedBaseInstance` is ignoring the last parameter. The solution is to indicate that `GLEW_ARB_base_instance` is not supported in these cases. Reviewers: fclem, brecht, jbakker Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5383
2019-06-05Fix crash when editing shaders on Intel HD 4000.mano-wii
In the Intel HD 4000 driver a shader has to be deleted in the same context in which it is created. However, because you can't use a rendering context on different threads, to maintain the multithreaded compilation, the solution was to use the `GL_ARB_get_program_binary` and copy the binary generated for the shader and generate a shader on the main context using that binary. This solution is limited only to Intel HD 4000 and windows. Reviewers: fclem Reviewed By: fclem Differential Revision: https://developer.blender.org/D5019
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-15GPU: Simplify select shaders.mano-wii
The shaders are: `GPU_SHADER_3D_FLAT_SELECT_ID` and `GPU_SHADER_3D_UNIFORM_SELECT_ID`. This commit allows the drawing of the mesh select ids to be done on a 32UI format texture. This simplifies the shader that previously acted on the backbuffer and had to do an uint to rgba conversion. Differential Revision: https://developer.blender.org/D4350
2019-03-04Fix/workaround T62167: Random crash when displaying wireframes.mano-wii
Some old AMD drivers crash when a vbo with stride 1 is used a few times. I have not found a real solution to this problem. So the solution was to use a vbo with stride 4 (which in theory is less efficient and takes up more memory space).
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-23Cleanup: use eGPU prefix for GPU enum typesCampbell Barton
2019-01-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
2018-12-05Workbench: Fix workbench broken on some config due to usuned fb slotClément Foucault
This seems to be a driver bug. Only windows + Radeon HD 7500M seems to be affected. Fix can be extended to more config if necessary.
2018-12-02Fix T57455: Laggy, freezing UI with Linux and Intel UHD 620Clément Foucault
Seems like a driver bug but doing glFlush() before these calls fixes it.
2018-11-02GPU: Add safety check for max line widthClément Foucault
On some platform does not support line width > 1.0 and can even throw and error. Better check an at least display something rather than no lines at all.
2018-10-26GPU: Add workarounds for buggy glBlitFramebuffer function on macOS + RadeonClément Foucault
When calling glBlitFramebuffer on most (if not all) mac that have a GPU from the Radeon Pro series, the data is not properly copied and only a subset of the pixels are correctly copied. This only happens when blitting the depth buffer if the depth buffer is GL_DEPTH24_STENCIL8. Changing the depth buffer format to GPU_DEPTH32F_STENCIL8 fixes the issue but only works if blitting the depth componnent. The stencil componnent still provoke issues when being copied.
2018-10-22GPU: Fix Issue with recursive downsample and Intel HDXXXClément Foucault
This is caused by a driver bug that prevent us from rendering to (or even binding) a texture mip level that is below GL_TEXTURE_MAX_LEVEL of the target texture. This is fine in most drivers (and legal AFAIK) but not on thoses Intels HDXXX + Windows. As a fix we just put GL_TEXTURE_MAX_LEVEL lower (which is illegal because it is undefined behaviour), but in practice it works ok and does not trigger any warnings or errors. This commit fixes most of the problems encountered on these GPUs (T56668).
2018-09-18GPUShader: Manually validate sampler countClément Foucault
This happens on NVidia GPUs, using more textures than the maximum allowed by the gl will NOT trigger a linking issue (maybe because of bindless texture implementation?). So in this case we manually count the number of samplers per shader stage and compare it against the GL limit. We discard the shader if the sampler count is too high. This shows the user something is wrong with the shader.
2018-09-11Cleanup: remove unused GPU code.Brecht Van Lommel
2018-07-27Fix GPU build error after recent commit.Brecht Van Lommel
2018-02-07GPU: Remove Mesa + Vega hack.Clément Foucault
This is not needed anymore with linux 4.15 + Mesa 17.3.3.
2017-10-11Eevee : Add a workaround for bug with AMD RX VEGA Linux + Mesa DriverClément Foucault
This bug (explained here https://github.com/dfelinto/opengl-sandbox/blob/downsample/README.md) is breaking eevee beyond the point it's workable. This patch workaround the issue by making sure every fbo have mipmaps that are strictly greater than 16px. This break the bloom visuals a bit but only for this setup.
2017-05-19remove GPU_legacy_support queryMike Erwin
In the move to OpenGL 3.3 core profile, we drop support for compatibility profile and older versions. OpenSubdiv was the only user; I'll update OSD next.
2017-05-19OpenGL: remove -noglsl option & GPU_extensions_disableMike Erwin
Also removed a leftover reference to the old basic-shader-glsl option.
2017-05-19remove GPU_geometry_shader_support, instanced_drawing_support queriesMike Erwin
These are always supported now - instancing as of GL 3.1 - geometry shaders as of GL 3.2 The change to rna_scene.c could use some cleanup, since we don't really need a runtime query function.
2017-05-19remove GPU_display_list_support queryMike Erwin
Display lists are not part of modern OpenGL. Only BGE used this, and I forced those uses to false. Commented out old BGE logic for reference.
2017-04-08OpenGL: drop support for EXT_geometry_shader4Mike Erwin
See gpu_shader.c for the main changes. EXT_geometry_shader4 brought this feature to GL versions < 3.2, but now it's just cluttering up our code. Soon all platforms will be on version 3.3 so we won't even have to check support at runtime!
2017-02-07Clay-Engine (merge clay-engine)Clément Foucault
Initial work by Clément Foucault with contributions from Dalai Felinto (mainly per-collection engine settings logic, and depsgraph iterator placeholder). This makes Blender require OpenGL 3.3. Which means Intel graphic card and OSX will break. Disable CLAY_ENGINE in CMake in those cases. This is a prototype render engine intended to help the design of real render engines. This is mainly an engine with enphasis in matcap and ambient occlusion. Implemented Features -------------------- * Clay Render Engine, following the new API, to be used as reference for future engines * A more complete Matcap customization with more options * Per-Collection render engine settings * New Ground Truth AO - not enabled Missing Features ---------------- * Finish object edit mode - Fix shaders to use new matrix - Fix artifacts when edge does off screen - Fix depth issue - Selection sillhouette - Mesh wires - Use mesh normals (for higher quality matcap) - Non-Mesh objects drawing - Widget drawing - Performance issues * Finish mesh edit mode - Derived-Mesh-less edit mode API (mesh_rende.c) * General edit mode - Per-collection edit mode settings * General engines - Per-collection engine settings (they are their, but they still need to be flushed by depsgraph, and used by the drawing code)
2016-10-10OpenGL: remove GLSL support query (it's always supported)Mike Erwin
2016-01-27World textures displaying for viewport in BI.Alexander Romanov
This patch supports "Image or Movie" and "Environment map" types of world texture for the viewport. It supports: - "View", "AngMap" and "Equirectangular" types of mapping. - Different types of texture blending (according to BI world render). - Same color blending as when it lacked textures (but render via glsl). {F207734} {F207735} Example: {F275180} Original author: @valentin_b4w Regards, Alexander (Blend4Web Team). Reviewers: sergey, valentin_b4w, brecht, merwin Reviewed By: merwin Subscribers: campbellbarton, merwin, blueprintrandom, youle, a.romanov, yurikovelenov, AlexKowel, Evgeny_Rodygin Projects: #rendering, #opengl_gfx, #bf_blender:_next Differential Revision: https://developer.blender.org/D1414
2016-01-09Cleanup: style, gpu moduleCampbell Barton
2016-01-08OpenGL: fix max texture anisotropy checkMike Erwin
Query max supported on init, use that to clamp user-set values.
2015-12-08OpenGL: split off framebuffer, shader and texture code into separate files.Brecht Van Lommel
2015-12-08OpenGL: remove non-power-of-two texture check, where even ES 2.0 does not ↵Brecht Van Lommel
need it.
2015-12-07OpenGL: new GPU_legacy_support() functionMike Erwin
Is current context compatible with legacy GL (version 2.1)? My earlier approach -- checking for GLEW_ARB_compatibility -- was not enough. This should always return true if we set our GL context up properly. It will return false when we switch to core profile.
2015-11-24OpenGL: clean up use of old extensionsMike Erwin
2015-10-20New function to draw offscreen, and related API changesDalai Felinto
This expose the capability of handling offscreen drawing. The initial support lays the barebones for addons to work with framebuffer objects and implement 3d viewport offscreen drawing. This can be used by script writers to make fisheye lens preview, head mounted display support, ... The complete documentation is here: http://www.blender.org/api/blender_python_api_2_76_1/gpu.offscreen.html Review and many changes by Campbell Barton (thank you :) https://developer.blender.org/D1533
2015-10-14Support for multi-sample off-screen buffersCampbell Barton
Replaces much slower manual accumulation buffer which simply did multiple renders. Needs OpenGL3.2, otherwise multi-sample is disabled.
2015-09-16Fix T46128: High Quality DoF brokenSergey Sharybin
The issue was caused by some special tricks needed to compile OpenSubdiv shader which was using stupid check whether geometry shader is used or not. Now made it more explicit call whether special OpenSubdiv trickery is needed or not. Its not ideal solution, but it's not really easy to do a proper solution for this, because while we can do half of the work with if-defs in the shader code but we'll still need to somewhat define layout of the input blocks which isn't really doable with current shader version we're using.
2015-09-14Revert "Fix crash in opengl render caused..."Campbell Barton
This reverts commit d64b1221c67846bb954855a19c8dd093b83adc8e. While this prevents the crash, offscreen renders still aren't working right.
2015-09-14Fix crash in opengl render caused by gfx being blacklisted forJoe Eagar
non-power-of-2 texture support. Note that all I did was pass the correct width/height into glReadPixels; the result may not be the same as if non2 textures were enabled.
2015-04-24Add debug option --debug-gpumem to show GPU memory used in status bar.Antony Riakiotakis
Only used in ATIs and NVIDIAs. Used extensions are: https://www.opengl.org/registry/specs/ATI/meminfo.txt http://developer.download.nvidia.com/opengl/specs/ If you read the documentation, the numbers are not supposed to be exact and also depend on the time when the call is made. The numbers can also change quite quickly. It's only meant to give a rough measure of what is going on.
2015-04-09Fix T31546 fragment program gets created every frameAntony Riakiotakis
That was really crappy indeed. Now we have a separate API for low level OpenGL programs, plus a nice interface for GPU, also removes some GL calls from main code as a plus :) The source for the programs is also moved to nice external .glsl files (not sure which extension convention GPU assemply uses)
2015-03-30Potential fix for T43987, ambient occlusion different between offscreenAntony Riakiotakis
and on screen rendering. Aaaaah, the beauty of driver implementations of OpenGL! Turns out the problem here is that drivers calculate df/dy differently in some cases (probably because OpenGL counts y reverse to how the window system does, so drivers can get confused). Fixed this for the ATI case based on info we have so far, there's also the Intel case which will be handled separately (missing info on Intel's renderer string etc). Unfortunately we can't really fix this for the general case so we'll have to haldle cases as they come in our tracker and by adding silly string comparisons in our GPU initialization module <sigh>.
2015-03-23cleanup: use spaces for alignmentMike Erwin
while studying GPU lib
2015-03-20Fix high quality depth of field on the Mac.Antony Riakiotakis
Quite a few things wrong here: * Mac did not support EXT_draw_instanced, only ARB_draw_instanced * Draw instanced did not work unless data came from vertex buffer, which is second time we see weird things with vertex arrays in mac * There were a few stupid mistakes by me as well, such as binding to uniform locations for the wrong shaders (it's a wonder it ever worked :p)
2015-03-19Depth of field high quality:Antony Riakiotakis
A new checkbox "High quality" is provided in camera settings to enable this. This creates a depth of field that is much closer to the rendered result and even supports aperture blades in the effect, but it's more expensive too. There are optimizations to do here since the technique is very fill rate heavy. People, be careful, this -can- lock up your screen if depth of field blurring is too extreme. Technical details: This uses geometry shaders + instancing and is an adaptation of techniques gathered from http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane- http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20- %20in%20Real-Time%20Rendering%20Course).ppt TODOs: * Support dithering to minimize banding. * Optimize fill rate in geometry shader.
2015-03-17Cleanup: bool & constMike Erwin
Using bool when we're asking yes/no questions such as whether some GPU feature is supported. Consolidated these simple functions into gpu_extensions.c and grouped them in the header. Const-ified some args where the functions don't modify the pointed-to data.
2015-03-03Another stability commit for legacy users - don't crash when togglingAntony Riakiotakis
dyntopo just notify user that their system doesn't support it.
2015-02-23Debug GPU functionality from soc-viewport_fx by Jason WilkinsAntony Riakiotakis
patch number D706 with changes: - WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging system functions) but leaves the checks we had intact. Old patch added the debug functionality only if we had the flag on to save some performance. Rationale here is that we might not want to recompile blender just to get the extra information, and having users start blender with a -d flag to get the extra information is also useful for bug reports. Those checks already existed and most expensive ones are hidden behind a debug mode check so performance should not be that bad. - Did some cleanup of existing functionality: When things go wrong blender side, just print the error, don't check for GL errors first. - Did not port changes needed for GLES to regular glew.h - Got rid of duplicate or very similar new functionality. Generally, code is more moving things around/cleanup and should work exactly as before apart from the debug context, so it's safe to add even now. It also provides a nice substitute function for glu error descriptions
2015-02-12Viewport compositing - first codeAntony Riakiotakis
This commit introduces a few ready made effects for the 3D viewport and OpenGL rendering. Included effects are Depth of Field, accessible from camera view and screen space ambient occlusion. Those effects can be turned on and tweaked from the shading panel in the 3D viewport. Off screen rendering will use the settings of the current camera. WIP documentation can be found here: http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2014-11-25Fix framebuffer completeness being broken after last framebuffer cleanupAntony Riakiotakis
commits. Basically, we don't set a draw buffer until draw time comes. Also add explicit validation function to validate after all textures have been attached (could be done automatically at bind time too probably, but left out for now)