jbikker / wrldtmpl8 Goto Github PK
View Code? Open in Web Editor NEWRetro coding in C/C++ in a 3D template with full low-level control.
License: Creative Commons Zero v1.0 Universal
Retro coding in C/C++ in a 3D template with full low-level control.
License: Creative Commons Zero v1.0 Universal
Where can I get that file?
I wanted very badly to try this, but it seems tied to windows and to some extent visual studio (which I can't justify installing, unfortunately). I tried to hack at it myself (and submit a PR) but noticed it is not just a matter of modifying some ifdefs, as some windows API code is used.
The easy parts:
#include <cl/cl.h>
should be #include <CL/cl.h>
.GLFW_EXPOSE_NATIVE_X11
, and using the appropriate context functions to pass ogl context to opencl.<cstring>
functions being used without being defined. An include may be missing or I made a mistake when trying to build.There are some parts that would require actual work. The first I noticed is that windows API synchronization functions are used for jobs. An alternative would have to be provided if you intend to support other OSs.
Either way, thanks for sharing, it is valuable for study even if I can't see it in action right away.
Severity Code Description Project File Line Suppression State
Error C1041 cannot open program database 'C:\Users\janis\Downloads\WrldTmpl8-main\WrldTmpl8-main\x64\Debug\vc143.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS benchmark C:\Users\janis\Downloads\WrldTmpl8-main\WrldTmpl8-main\template\template.cpp 1
World.cpp is defining static const uint commitSize = BRICKCOMMITSIZE / 4 + gridSize;
Why the div by 4 ? I think this makes the commit buffer to small ? (commit buffer is commit
in code, not commitBuffer
(not used anymore?))
I added some quick&dirty frame-sliced commits (only upload MAXCOMMITS each frame, remaining are done next frames) so I don't have to bump the MAXCOMMITS exponential.
This however leads to a crash during StreamCopy (during World::Commit, dst pointer is not writable) and I believe this is due the buffer not allocated big enough to actually hold MAXCOMMITS bricks+Indices?
Quickly inspecting it I wonder why this div by 4 is done.
Not doing that div works but it could be just masking the symptoms ?
OpenCL compilation of trace.cl fails on the current master
file cl/trace.cl, line 80, pos 35:
Explicit cast from address space "global" to address space "private" is not allowed
that points to line:
if (p != lp) page = (PAYLOAD*)bricks[v / (CHUNKSIZE / PAYLOADSIZE)], lp = p;
My runtime:
available OpenCL platforms:
#0: NVIDIA CUDA
OpenCL device: NVIDIA CUDA
Device # 0, GeForce RTX 2070 (OpenCL 1.2 CUDA)
Allocated 8MB on CPU and GPU for the top-level grid.
Allocated 512MB on CPU and GPU for 1024k bricks.
Allocated 32KB on CPU for bitfield.
Allocated 4MB on CPU for brickInfo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.