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
2014-01-05Fix T38024 crash when rebuilding sculpt mode buffers.Antony Riakiotakis
Main issue here is that glBuf* calls were invoked from threads different than main thread. This caused a crash (since those do not have a GL context active). Fix here is twofold: * add an ID buffer in buffer pool that handles pbvh buffers and is freed from main thread when gpu_buffer_pool_free_unused is called. * do not create glbuffers in derivedmesh creation routine, rather tag nodes for update and create those in the draw function (guaranteed to be called from main thread) Reviewed By: brecht Differential Revision: https://developer.blender.org/D169
2014-01-03Fix T38045: Clone stamp crashesSergey Sharybin
Issue seems to be caused by thread-unsafe IMB_freeImBuf. Now use generic BKE_image_release_ibuf to de-reference image buffer which was acquired from image datablock.
2014-01-03Code clean-up change naming of gpu buffers used by pbvh to betterAntony Riakiotakis
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer, renamed to GPU_PBVH_Buffers
2013-12-26Threaded object update and EvaluationContextSergey Sharybin
Summary: Made objects update happening from multiple threads. It is a task-based scheduling system which uses current dependency graph for spawning new tasks. This means threading happens on object level, but the system is flexible enough for higher granularity. Technical details: - Uses task scheduler which was recently committed to trunk (that one which Brecht ported from Cycles). - Added two utility functions to dependency graph: * DAG_threaded_update_begin, which is called to initialize threaded objects update. It will also schedule root DAG node to the queue, hence starting evaluation process. Initialization will calculate how much parents are to be evaluation before current DAG node can be scheduled. This value is used by task threads for faster detecting which nodes might be scheduled. * DAG_threaded_update_handle_node_updated which is called from task thread function when node was fully handled. This function decreases num_pending_parents of node children and schedules children with zero valency. As it might have become clear, task thread receives DAG nodes and decides which callback to call for it. Currently only BKE_object_handle_update is called for object nodes. In the future it'll call node->callback() from Ali's new DAG. - This required adding some workarounds to the render pipeline. Mainly to stop using get_object_dm() from modifiers' apply callback. Such a call was only a workaround for dependency graph glitch when rendering scene with, say, boolean modifiers before displaying this scene. Such change moves workaround from one place to another, so overall hackentropy remains the same. - Added paradigm of EvaluaitonContext. Currently it's more like just a more reliable replacement for G.is_rendering which fails in some circumstances. Future idea of this context is to also store all the local data needed for objects evaluation such as local time, Copy-on-Write data and so. There're two types of EvaluationContext: * Context used for viewport updated and owned by Main. In the future this context might be easily moved to Window or Screen to allo per-window/per-screen local time. * Context used by render engines to evaluate objects for render purposes. Render engine is an owner of this context. This context is passed to all object update routines. Reviewers: brecht, campbellbarton Reviewed By: brecht CC: lukastoenne Differential Revision: https://developer.blender.org/D94
2013-12-18Game Engine: Level of detail support and toolsDaniel Stokes
Levels of detail can be added and modified in the object panel. The object panel also contains new tools for generating levels of detail, setting up levels of detail based on object names (useful for importing), and clearing an object's level of detail settings. This is meant as a game engine feature, though the level of details settings can be previewed in the viewport. Reviewed By: moguri, nexyon, brecht Differential Revision: http://developer.blender.org/D109
2013-12-13Image cache rewrite to using generic movie cacheSergey Sharybin
Summary: Behaves very much the same as cache for Movie Clip datablock: - Image now have `MovieCache *cache` field which replaced legacy `ListBase ibufs`. This allows image datablock to easily keep of image buffers which are owned by itself. This field isn't saved to the file and getting restored on undo steps. However, cache limit is global for movies, sequences and image datablocks now. So overall cached image buffers size will not go above cache limit size in user preferences. - Image buffers which are marked as BITMAPDIRTY will never be freed from the cache. - Added utility function to iterate over image buffers saved in movie cache. - Movie cache cleanup check callback now have ImBuf argument which can be used in a condition of cleanup. - Added some utility functions which replaces legacy ibufs iterations with image cache iteration which happens from inside a lock. - Fixed `image_mem_size()` which was only counting one of the buffers if both float and byte buffer present. Additional notes: - `BKE_image_get_first_ibuf()` is rather stupid, but direct access to ibufs->first was also the same stupid idea. Would consider avoid this function is another project. - There are some places which doesn't look threadsafe, but they already were not so much threadsafe anyway before. So think not a big deal with solving this later. Finally solves infinite memory usage by image sequences! :) Reviewers: brecht, campbellbarton Reviewed By: brecht CC: sebastian_k Differential Revision: http://developer.blender.org/D95
2013-12-03Cleanup: Internal degrees removal.Bastien Montagne
This patch changes most of the reamining degrees usage in internal code into radians. I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them. WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly in previous versions (a few angle properties would use radians values as degrees...). Details: - Data: -- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such (using getter/setter functions), still using radians internally. -- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev. - Modifiers: -- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done. - Postprocessing: -- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done. - BGE: -- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type, it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence can be either distance or angle values, depending on the mode. Will leave this to BGE team. -- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself, as it seems this is the expected value here...). -- bRadarSensor.angle: Done. Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt Thanks to all! Differential Revision: http://developer.blender.org/D59
2013-11-26Fix T37633: duplicate value GPUDynamicType could cause GLSL render issues.Brecht Van Lommel
2013-11-25Blender Internal: Add "Lamp Data" shader node that allows shaders to acquire ↵IRIE Shinsuke
information such as light vector from specified Lamp. For now this provides the following outputs: - Color - Light Vector - Distance - Shadow - Visibility Factor Note: Color output is multiplied by the lamp energy. Multiplication of color*max(dot(light_vector,normal_vector),0)*shadow*visibility_factor produces the exact same result as the Lambert shader. Many thanks to Brecht for code review and discussion!
2013-11-24Blender Internal: Revert own previous commit for "Camera Data" node, correct ↵IRIE Shinsuke
GLSL code for view vector output of "Geometry" node. Revert 0c7d2de38219. The "Camera Data" node actually gives the location of the point in camera coordinate system. To obtain actual camera data, we can use "Geometry" node instead. Also modify the "Geometry" node, to produce correct view vector output in orthographic GLSL preview.
2013-11-24Blender Internal: Fix shader node "Camera Data" that doesn't consider ↵IRIE Shinsuke
orthographic view. Note that Cycles still needs to fix.
2013-11-22Cycles: Add a "Normal" input socket to the Layer Weight node + GLSL drawing ↵Thomas Dinges
code. Patch by lichtwerk (Philipp Oeser). Differential Revision: http://developer.blender.org/D28
2013-11-21Blender Internal: Add shader nodes "Separate HSV" and "Combine HSV", same as ↵IRIE Shinsuke
Cycles' ones.
2013-11-12Change the behavior of AO pass in Blender internal's shader/render node tree ↵Irie Shinsuke
so that it becomes (1.0, 1.0, 1.0) when AO is disabled. For materials using AO pass, this makes the material preview and the GLSL preview more accurate, but shouldn't affect final rendering in most cases because we usually enable AO when using the AO pass in node tree. Thanks to Brecht for code review.
2013-11-09Cycles / Fresnel Node:Thomas Dinges
* Add a "Normal" Input to the Fresnel node. * Fix for the Fresnel GLSL code (normalize the Incoming vector). Patch #37384 by Philipp Oeser (lichtwerk) , thanks!
2013-10-16style cleanupCampbell Barton
2013-10-01remove assert for poly_find_ear(), added recently but its incorrect, also ↵Campbell Barton
minor style edits.
2013-09-30Fix #36882: cycles gamma node not working with glsl materials.Brecht Van Lommel
2013-09-20FIX: [#27536] GLSL object space normal maps have wrong shadingAndrea Weikert
Added object and world space for normal map in GLSL view.
2013-09-16Fix #36734 Matcap displays solid black.Lukas Toenne
GLSL typo in r60151 caused this.
2013-09-16Cycles Hair: Two basic bair shaders addedStuart Broadfoot
A new hair bsdf node, with two closure options, is added. These closures allow the generation of the reflective and transmission components of hair. The node allows control of the highlight colour, roughness and angular shift. Llimitations include: -No glint or fresnel adjustments. -The 'offset' is un-used when triangle primitives are used.
2013-09-12BGE: Potential fix for [#35522] Broken game engine compatibility since 2.66a ↵Daniel Stokes
on some ATI cards? Disabling display lists for legacy ATI cards since they don't support display lists well. Also removing an unused variable from the display list rasterizer.
2013-09-05Fix broken GLSL shader after recent changes.Brecht Van Lommel
2013-09-04Cycles: add a sharpness input to the Cubic SSS falloff. When set to 1 this willBrecht Van Lommel
give a result more similar to the Compatible falloff option. The scale is x2 though to keep the perceived scatter radius roughly the same while changing the sharpness. Difference with compatible will be mainly on non-flat geometry.
2013-08-27ghash/bli-listbase edits, rename BLI_ghash_pop -> BLI_ghash_popkey (since it ↵Campbell Barton
takes a key as an arg and isnt popping any element from the hash as you might expect). add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
2013-08-26replace hashes with sets where possible.Campbell Barton
2013-08-24fix for GPU_update_bmesh_buffers not setting bmesh vertex index values as ↵Campbell Barton
dirty (could cause errors later).
2013-08-19Make GPU buffers allocation/freeing safe for threadingSergey Sharybin
Code in GPU_buffers_free was already trying to be safe for threading, by skipping OGL calls there, but in fact it was still buggy. Namely, freeing was doing buffers shift in a cycle, and if two threads will call this function shifting will go crazy. Now made it so GPU_buffers_alloc and GPU_buffers_free are using mutex lock, so they're completely safe for threading. Same goes to gpu_buffer_setup function. It required minor functions reshuffle, so there're no locks happening from locked thread, but it's all very straightforward change -- svn merge -r58276:58277 ^/branches/soc-2013-depsgraph_mt
2013-08-16replace calls to BLI_linklist_append with BLI_linklist_prepend where order ↵Campbell Barton
us unimportant, since append steps over the whole list each time.
2013-08-09OpenGL VBO's: free VBO pool before redraw, otherwise this just holds onto memoryBrecht Van Lommel
after objects are deleted until another big object is added. There's no good reason to do this, or to think that our pool is somehow much faster than using the OpenGL API to allocate and free buffers.
2013-07-23BGE fix [#35472] Sun variance shadows does not work in game engineDaniel Stokes
The game engine had depth testing enabled when blurring the shadows which caused the blurring to not work properly.
2013-07-23remove the pointer from BLI_bitmap's typedef, Campbell Barton
hides that an arg passed is really an array which may be modified by other functions.
2013-07-20BGE fix [#35195] Shadow Only lamps only work with Specular enabledDaniel Stokes
The way we do shadow only doesn't work well with colored shadows, though it does work if you apply enough light to the shadow.
2013-07-01add some missing members to opengl debug print, also use a macro to avoid ↵Campbell Barton
passing each arg twice.
2013-07-01opengl debug info, make GPU_state_print() only show values in arrays that ↵Campbell Barton
are set. (was print 32 values every time)
2013-06-26quiet double promotion warning and some style cleanupCampbell Barton
2013-06-25Fix #34909 Texture paint mode does not correctly update when usingAntony Riakiotakis
textures larger than 2048x2048. Check if texture is over user preference or GPU limit in texture paint mode and if it is, scale the partial redraw rectangle before uploading to GPU. This should be faster than rescaling the whole texture.
2013-06-25style cleanupCampbell Barton
2013-06-24Fix GLSL not showing shading properly on the backside of faces. Now it flipsBrecht Van Lommel
the normal towards the viewer, seems to give consistent results with blender internal, cycles, normal maps, etc. Started from patch #32761 by Vitor Balbio, but changed it to do normal flipping earlier so it solves all cases.
2013-06-23Fix #35848: render crash in background mode due to missing G.main.Brecht Van Lommel
2013-06-15Fix #35768: crash in with "free image textures" option and 3D viewport with ↵Brecht Van Lommel
textured draw mode open. OpenGL texture free needs to happen in the main thread, but it was freeing a copy of the image datablock. I can't understand how this code ever worked, probably it never did.
2013-06-13code cleanup: also fix crash in GPU_state_print(). and confine to debug mode ↵Campbell Barton
builds.
2013-06-06style cleanupCampbell Barton
2013-06-05Fix textured draw mode + dyntopo crash fix to cover more cases.Brecht Van Lommel
2013-06-05Cycles: GLSL materials now can use multiple UV maps with the attribute node.Brecht Van Lommel
2013-06-05Obsessive Null Checking Compulsion case:Antony Riakiotakis
Textured draw mode + DynTopo crashed after recent specularity tweak.
2013-06-04Fix #35602: VBO + dynamic topology sculpt did not show specularity.Brecht Van Lommel
2013-06-04Fix #35617: cycles GLSL object texture coordinates were wrong.Brecht Van Lommel
2013-05-28move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)Campbell Barton
remove MEM_sys_types.h which was a duplicate.
2013-05-27Fix #35505: cycles object space normal mapping did not match blender internal.Brecht Van Lommel
Now it uses the same (strange) YZ flipping convention.