From: Vasco A. da S. C. <vas...@gm...> - 2015-06-10 00:27:32
|
- Added the main boolean weaving code. Eliminated gotos in boolfinal. - Made the code more thread-safe by reducing amount of direct uses of the global app pointer. This was a good exercise to see the amount of effort that will be required to do a full reimplementation of the rendering pipeline in OpenCL. The main obstacle to an OpenCL port is, as I expected, the boolean code which is branch and goto heavy and uses dynamic linked lists. What I did not expect was that the total LOC count in that boolean weaving code dwarfs everything else put together (traversal, ray generation, shade, writing to the frame buffer). The current code already supports threaded execution with some heavy app context data structures. These probably have too large of a memory footprint per thread for the kind of fine grained parallelism with thousands of threads in flight that we desire (see 'struct resource'). As discussed with Sean a couple of days ago I am going to stop working on this angle and start working on the grid spatial partitioning in OpenCL next. On Fri, Jun 5, 2015 at 12:16 AM, Vasco Alexandre da Silva Costa < vas...@gm...> wrote: > Simplify the shading code some more. > > On Thu, Jun 4, 2015 at 11:10 PM, Vasco Alexandre da Silva Costa < > vas...@gm...> wrote: > >> Phong shading with a default material. >> >> The idea here is to create a simplified self-contained rendering pipeline >> that we can use as a basis for a port to OpenCL later. >> >> Things to be done: >> - rip the acceleration structure out and replace it with the simplified >> grid we want to use. >> - cleanly separate the shots from the boolean weaving with minimal >> context between stages. >> - cleanly mark all data in/out on each stage and minimize CPU<->GPU data >> transfers. >> >> On Thu, Jun 4, 2015 at 5:04 PM, Vasco Alexandre da Silva Costa < >> vas...@gm...> wrote: >> >>> Now with the actual patch attached... >>> >>> >>> On Thu, Jun 4, 2015 at 5:03 PM, Vasco Alexandre da Silva Costa < >>> vas...@gm...> wrote: >>> >>>> Simplified code for: >>>> - ray generation >>>> - writing the color output to the frame buffer >>>> >>>> On Tue, Jun 2, 2015 at 11:55 PM, Vasco Alexandre da Silva Costa < >>>> vas...@gm...> wrote: >>>> >>>>> Hello, >>>>> I've been trying to make a really simple bare bones rendering loop in >>>>> C without branches, recursion, etc that we can try to parallelize later. >>>>> >>>>> For now I managed to do this for the ray generation part (patch >>>>> attached). Still need to work on the ray traversal and color computation >>>>> proper. >>>>> >>>>> Regards, >>>>> >>>>> -- >>>>> Vasco Alexandre da Silva Costa >>>>> PhD Student at Department of Information Systems and Computer Science >>>>> Instituto Superior Técnico/University of Lisbon, Portugal >>>>> >>>> >>>> >>>> >>>> -- >>>> Vasco Alexandre da Silva Costa >>>> PhD Student at Department of Information Systems and Computer Science >>>> Instituto Superior Técnico/University of Lisbon, Portugal >>>> >>> >>> >>> >>> -- >>> Vasco Alexandre da Silva Costa >>> PhD Student at Department of Information Systems and Computer Science >>> Instituto Superior Técnico/University of Lisbon, Portugal >>> >> >> >> >> -- >> Vasco Alexandre da Silva Costa >> PhD Student at Department of Information Systems and Computer Science >> Instituto Superior Técnico/University of Lisbon, Portugal >> > > > > -- > Vasco Alexandre da Silva Costa > PhD Student at Department of Information Systems and Computer Science > Instituto Superior Técnico/University of Lisbon, Portugal > -- Vasco Alexandre da Silva Costa PhD Student at Department of Information Systems and Computer Science Instituto Superior Técnico/University of Lisbon, Portugal |