Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14334)

Issue 4631052: GPU buffers refactor (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 10 months ago by nicholasbishop
Modified:
12 years, 2 months ago
Reviewers:
brechtvl, psy-fi, Jason.A.Wilkins, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

This patch attempts to clean up and document the GPU buffers code. There are a few bug fixes as well. Summary: * Bugfix: make GPU_buffer_copy_normal convert from shorts to floats correctly, also fixed the use of cached face normal CustomData. * Bugfix: changed the `mat_nr' field of GPUBufferMaterial from char to short. * Changed color buffer setup to not alloc a temporary copy of color data, just passes the MCol data in directly. * Changed the GPU buffer pool code to make clearer what operates specifically on the global pool. * Lots of refactoring for GPU_drawobject_new; should operate mostly the same (except got rid of one unecessary allocation), just split into more functions and without macros now. * Converted some #defines into enumerations. * Made some stuff private, pulled out of header file. * Deleted unused function GPU_buffer_pool_free_unused(). * Removed GPU_interleaved_setup and related #defines. (I think this was used for editmode VBOs, but those were disabled.) * Added lots of comments. * Added a few comments in the code signed `--nicholas' to note places where I am unsure about design or usage, would be good to address these better. * Code formatting changed to be more consistent with the rest of Blender. * Renamed some fields and variables to be more consistent with Blender's naming conventions. * Renamed some fields and variables to use more descriptive names, e.g. renamed `redir' to `mat_orig_to_new'. * Removed print outs with DEBUG_VBO -- don't feel too strongly about this one, just not used elsewhere in Blender, could be easily added back if others disagree though. * Moved the PBVH drawing code down to the bottom of the file, before was sitting in the middle of the other VBO code

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1180 lines, -1202 lines) Patch
source/blender/blenkernel/intern/cdderivedmesh.c View 12 chunks +23 lines, -20 lines 0 comments Download
source/blender/gpu/GPU_buffers.h View 4 chunks +64 lines, -71 lines 0 comments Download
source/blender/gpu/intern/gpu_buffers.c View 3 chunks +1092 lines, -1110 lines 2 comments Download
source/blender/windowmanager/intern/wm_init_exit.c View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9
nicholasbishop
12 years, 10 months ago (2011-06-19 17:39:12 UTC) #1
psy-fi
Better indeed, though in my opinion a bigger refactor should be done on cdderivedmesh. The ...
12 years, 10 months ago (2011-06-19 19:00:28 UTC) #2
psy-fi
http://codereview.appspot.com/4631052/diff/1/source/blender/gpu/intern/gpu_buffers.c File source/blender/gpu/intern/gpu_buffers.c (right): http://codereview.appspot.com/4631052/diff/1/source/blender/gpu/intern/gpu_buffers.c#newcode104 source/blender/gpu/intern/gpu_buffers.c:104: useVBOs = (GL_ARB_vertex_buffer_object ? 1 : 0); shouldn't GL_ARB_vertex_buffer_object ...
12 years, 10 months ago (2011-06-19 19:01:00 UTC) #3
nicholasbishop
Thanks for the review psy-fi. > Better indeed, though in my opinion a bigger refactor ...
12 years, 10 months ago (2011-06-19 19:37:04 UTC) #4
Jason.A.Wilkins
On 2011/06/19 19:00:28, psy-fi wrote: > Better indeed, though in my opinion a bigger refactor ...
12 years, 10 months ago (2011-06-22 12:46:51 UTC) #5
brechtvl
I agree we should do incremental improvement of drawing code, this kind of refactoring is ...
12 years, 10 months ago (2011-06-22 14:13:03 UTC) #6
nicholasbishop
> I would like to add that the more done to derived mesh and gpu ...
12 years, 10 months ago (2011-06-28 00:50:18 UTC) #7
jason.a.wilkins_gmail.com
On Mon, Jun 27, 2011 at 7:50 PM, <NicholasBishop@gmail.com> wrote: > Hi Jason, hopefully there ...
12 years, 10 months ago (2011-06-28 03:15:20 UTC) #8
psy-fi
12 years, 10 months ago (2011-06-28 14:39:19 UTC) #9
No prob, thanks for commiting :)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b