Comments (4)
the grid is number of pixel processed per thread in each axis so you want to divide image size by num threads... in d3d they call this thread group count so I think you are right in thinking “number of groups”, I think maybe it is a bit confusing in pmtech because d3d does not use num_threads in d3d they are specified inside the pmfx shader but in metal you pass the number of threads and the grid into the graphics api. I am also using the “grid” terminology from metal which is my primary development platform now.. although I started off with d3d11 as the main reference design for the pen::renderer api.
I am just working on Vulkan api now and will be looking more into improving the compute API so I think a design would be nice to be able to get the number of groups from the pmfx shader which we already can specify, but having the c++ api to obtain that info would be nicer to make HLSL, Metal and Vulkan SPIRV feel the same.
from pmtech.
It seems good to specify the grid number by pen::renderer_dispatch_compute, but internally, pen::renderer_dispatch_compute can do a transform to group number.
btw, I quite like the way of pmtech is working and thanks for the sharing.
but I don't quite understand to bother to record the render_cmd to _cmd_buffer. why not to use the dx11's deferred context?
from pmtech.
I see, yes we could make the transform happen inside the dispatch function.. I will take a look at this once I get the Vulkan compute implementation working just to see how all the platforms work differently and make the api as consistent as possible.
The reason for the Cmd buffer is historical and it is to allow OpenGL to be multi threaded as well.. originally I had a d3d9 rendering backend and back in the day when I was working on Xbox 360 games the command buffer was an optimisation I made to push the d3d driver overhead on to a separate core because there was not a deferred context at that time.
I am actually designing a new engine / renderer for my job and it does not use a command buffer but instead using multi threaded rendering contexts and makes monolithic pipelines like Vulkan instead of setting separate render states.
Thanks for using pmtech, I hope it helps you to make some cool stuff.. I am still actively working on it and although some of the renderer design might be a bit dated now I plan on sticking with it and maintaining the project so if you do have issues I am happy to help out and improve things :)
from pmtech.
thanks
from pmtech.
Related Issues (20)
- Some issues on Windows HOT 4
- the hot reload seems broken HOT 7
- Failed to build examples on Mac OS Catalina HOT 6
- Add some gpu culling feature HOT 2
- error C3861: “renderer_tcp_resolve_ratio” HOT 2
- pthread_cancel HOT 5
- Shadow maps sample does not work on macOS/OpenGL HOT 1
- docs HOT 2
- Vulkan support HOT 10
- error when loading shared libraries libfmod.so.11 : no such file or dir HOT 7
- Windows Visual Studio 2019 Build problems HOT 3
- Building for Web Assembly got audio_player linker errors HOT 5
- Example file debug_primitives.cpp is empty HOT 1
- Copyright year is outdated HOT 1
- mouse_wheel %f instead of %i HOT 1
- be ashamed of yourself
- why did you sell yourself as a cheap slave?
- Issue with using pmbuild binary on Linux HOT 7
- How to build from source on MSYS2 MINGW64? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pmtech.