Giter Site home page Giter Site logo

Comments (4)

polymonster avatar polymonster commented on July 3, 2024

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.

raptoravis avatar raptoravis commented on July 3, 2024

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.

polymonster avatar polymonster commented on July 3, 2024

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.

raptoravis avatar raptoravis commented on July 3, 2024

thanks

from pmtech.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.