Giter Site home page Giter Site logo

Comments (6)

jonasarrow avatar jonasarrow commented on July 18, 2024

Wouldn't it be useful to move the block header instructions (reset of uniform stream, ...) to these delay slots. For the uniform stream, you have to wait 3 cycles anyway. So the delay slots would be a good place to do it.

Then coming from the preceding block would not reload the uniform address.

Obviously, this would make the kernel Validation/uniform address step a little more complicated.

from mesa.

anholt avatar anholt commented on July 18, 2024

That would mean that the one doing the branch would need to calculate the uniforms offset of where it's branching to (on either side), rather than using the load immediates like we do today. That seems worse.

from mesa.

jonasarrow avatar jonasarrow commented on July 18, 2024

Yes, you would need to calculate the offset. But for a given branch, it should be a fixed offset (we don't do branches to dynamic computed targets right now, don't we?).

So it would change from

Branch xxx
nop
nop
nop

xxx:
Load Imm Offset
Reset Uniform
...

To

Branch xxx
Load Imm Offset
Reset uniform
nop

xxx:
...

More specifically, you could substitute the Load Imm with a Uniform read, saving one cycle (MOV UNIFORM ADDR, uni).
And if you issue the Uniform Reset in the last slot, you should be save moving the branch two instructions upwards filling the other nop slots (if there is no dependency (e.g. flag updates)).

Am 19. Juli 2016 19:30:56 MESZ, schrieb Eric Anholt [email protected]:

That would mean that the one doing the branch would need to calculate
the uniforms offset of where it's branching to (on either side), rather
than using the load immediates like we do today. That seems worse.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#37 (comment)

from mesa.

jonasarrow avatar jonasarrow commented on July 18, 2024

Of course you would need to make the MOV having the same condition flag set like the branch (if you branch, reset, if not, don't).

Ahh, this is the problem, there is no (fast) way to do this across the SIMD. You only have the flags for one element.

So yeah, it wont work. Forget it.

from mesa.

jonasarrow avatar jonasarrow commented on July 18, 2024

Did some work on this here: jonasarrow/mesa_freedesktop@500b615

I didn't find a program fragment which yields a shader in which the branch is not the last dependency, so untested. But in the cases of no improvement, it works.

from mesa.

anholt avatar anholt commented on July 18, 2024

Oh, this issue was still open. The code landed a while ago.

from mesa.

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.