0
I Use This!
Inactive

Commits : Listings

Analyzed 1 day ago. based on code collected 1 day ago.
May 19, 2023 — May 19, 2024
Commit Message Contributor Files Modified Lines Added Lines Removed Code Location Date
* added oclraster presentation slides (including notes)
a2flo
as Florian Ziesche
More... over 11 years ago
* implemented fast! frustum culling * for future reference on fast frustum culling and thx: http://fgiesen.wordpress.com/2010/10/17/view-frustum-culling * note: except for fixing precision problems, this concludes the culling part
a2flo
as Florian Ziesche
More... over 11 years ago
* improved culling of too small triangles / depending on fp imprecision * bin bounds from clip coordinates are now computed using round (instead of floor/ceil)
a2flo
as Florian Ziesche
More... over 11 years ago
* reorganized pipeline: triangles that are culled in the transform program are no longer added to the transformed buffer (-> no longer passed to the binning kernel) * due to this change: * added an info buffer that currently holds the amount of triangles that passed * triangles are added to the transformed buffer using an atomic index * reorganized user output buffer handling (will be copied to global memory at the end; user accesses output as private memory now, instead of global memory) * binning and rasterization kernels are only called now when there are triangles that have to be rendered * removed the index buffer kernel parameter from the rasterization kernel (not needed any more and unusable) * user output and passing from transform -> binning -> rasterization can be considered "packed" now * added opencl::_fill_buffer function (will call opencl 1.2 enqueueFillBuffer); note that this is still experimental on os x * added an optional size parameter to opencl::read_buffer * actually added a function to the opencl class to get the (computed) platform cl version * renamed rasterize_program to rasterization_program (for consistency) * renamed fragment_xy to fragment_coord * simple shaders have an actual function name now (instead of "main")
a2flo
as Florian Ziesche
More... over 11 years ago
* moved some of the binning/clipping code to the transform program/stage (computation of 2d coords for transformed vertices if all vertices are "valid"/in front of the camera and inside the viewport) * note: this actually culls degenerate and backfacing triangles now (in the case mentioned above) * internal transform buffer is now stored as a float[16] (see comments for packing info)
a2flo
as Florian Ziesche
More... over 11 years ago
* some culling progress (disabled for now, since it's still wip) * potentially better precision when computing the cross products of all vertices in the transform program
a2flo
as Florian Ziesche
More... over 11 years ago
* updated the readme (only x86 is supported on windows right now due to clang/libc++ only supporting x86; added linux info; added build instructions gist; removed gcc/libstdc++ info since it's not supported)
a2flo
as Florian Ziesche
More... over 11 years ago
* pipe actual transformed vertices through to the binning kernel (+correctly align the transform buffer) in preperation for triangle culling * added cube model for testing purposes
a2flo
as Florian Ziesche
More... over 11 years ago
* why does amd always have issues? -> use actual arrays instead of vectors in the binning kernel, since amd doesn't support vector subscripts
a2flo
as Florian Ziesche
More... over 11 years ago
* removed unnecessary memory fences * renamed pixel_color and pixel_depth to fragment_color and fragment_depth
a2flo
as Florian Ziesche
More... over 11 years ago
* due to opencl not allowing reads and writes to the same image object inside a kernel: completely moved to using normal global memory buffers as framebuffers (color: uchar4, depth: float); note that this also means that the framebuffer always has to be copied to an opengl framebuffer before blitting it to the actual window framebuffer * simplified/cleanup up the binning kernel * when a kernel fails to compile, actually delete the kernel object and return a nullptr * if a user program fails to compile, print it to the console and log * rasterization program changes: always read the framebuffer color and depth at the start; don't reset the pixel_color any more (-> it will always contain the last valid color now); some cleanup * added clearing of global memory framebuffers to the clear framebuffer kernel * removed now obsolete development transform and rasterize kernels
a2flo
as Florian Ziesche
More... over 11 years ago
* added fragment location and barycentric coordinates as an input to the users rasterization program (main function) * read and use previously stored depth from the depth buffer (in the rasterization program), always store linear depth and set depth to FLT_MAX when clearing the depth buffer * nicer "error"/info message when opengl sharing is disabled in the config * some cleanup
a2flo
as Florian Ziesche
More... over 11 years ago
* use device specific struct size info for user defined structs when creating user transform buffers * store per device info of user defined structs in an unordered_map for easier access * added random model scaling to oclr_simple
a2flo
as Florian Ziesche
More... over 11 years ago
* version bump and added deployment target for oclr_simple
a2flo
as Florian Ziesche
More... over 11 years ago
* implemented user buffer binding (now mandatory) and automatic setting of kernel parameters and automatic creation+handling of transformed user buffers (transform program output) * additional restriction: user buffer names must be unique across the used transform and rasterization program * exact index range must be specified now every time when making a draw call (since the index buffer is a simple opencl buffer now, the necessary information is not available any more) * oclraster simple sample changes: uses custom shaders now + added random light color, changing light position and rotation of the model (uniform buffers are updated every frame)
a2flo
as Florian Ziesche
More... over 11 years ago
* added transform/rasterize program binding + use of bound programs in the transform/rasterization stage (note: bound program pointers are stored in draw_state for now - these must always be valid!) * handle user kernel identifiers internally again (there is no need for the user to specify these + no potential double identifier usage) * removed some debug code
a2flo
as Florian Ziesche
More... over 11 years ago
* implemented kernel code generation for user supplied transform and rasterize programs (via template kernels and slightly insane string processing) * note: user-kernels on the device/opencl side should be fully working now; only things missing are the automatic buffer and kernel parameter handling on the host side, and specifying which user programs to use in some kind of context * thanks to c++11 raw string literals: moved template kernel code into the actual .cpp files (transform/rasterize program resp.) -> removed old template kernel files * removed kernel compilation of previous transform/rasterize kernels (these aren't necessary any more) * added in-place core::find_and_replace
a2flo
as Florian Ziesche
More... over 11 years ago
* get, check and store platform opencl version (there are only three opencl 1.2 function calls right now, but these shouldn't be called on platforms only supporting 1.1/1.0) * this project now also works on nvidias opencl implementation (+updated comment)
a2flo
as Florian Ziesche
More... over 11 years ago
* new screenshots
a2flo
as Florian Ziesche
More... over 11 years ago
* added premake.sh option to disable/enable the "-mwindows" flag when compiling with mingw (determines if an additional cmd window containing stdout is opened - or if stdout is written to the active shell)
a2flo
as Florian Ziesche
More... over 11 years ago
* fixed building/running on windows using clang/libc++ (don't use -integrated-as; use fixed size cl::NDRange; don't use c++11 random_device to feed/initialize mt19937 generator) * added config option to disable/enable creating a shared opengl/opencl context * removed obsolete opencl kernel build option * for debugging purposes: print supported opencl texture formats using the logger, not cout * note: this project is now successfully running on os x, linux and windows, using the apple, amd and intel opencl platforms
a2flo
as Florian Ziesche
More... over 11 years ago
* removed debug code
a2flo
as Florian Ziesche
More... over 11 years ago
* remote debugging is fun
a2flo
as Florian Ziesche
More... over 11 years ago
* use the pure opencl framebuffer + copy to opengl framebuffer as an actual (slow!) fallback when sharing the opengl framebuffer fails * default to opengl 3.2 core on os x; use default opengl on all other platforms * version bump to d2
a2flo
as Florian Ziesche
More... over 11 years ago
* test code to workaround opengl fbo sharing issues with amd cpus (create the main framebuffer/image directly in opencl and simple copy the data to an opengl framebuffer every frame)
a2flo
as Florian Ziesche
More... over 11 years ago
* set GL_TEXTURE_MAX_LEVEL to 0 (might fix the amd opencl/opengl sharing issue)
a2flo
as Florian Ziesche
More... over 11 years ago
* include the logger header when trying to print errors ...
a2flo
as Florian Ziesche
More... over 11 years ago
* check gl function pointers for validity
a2flo
as Florian Ziesche
More... over 11 years ago
* more amd cl compat
a2flo
as Florian Ziesche
More... over 11 years ago
* try to appease the amd opencl compiler
a2flo
as Florian Ziesche
More... over 11 years ago