Code Monkey home page Code Monkey logo

Comments (6)

redorav avatar redorav commented on June 10, 2024

Hi again @plekakis, thanks for the request! I have been toying around with the code and I think it can be implemented, with the following restrictions:

  • It will only be implemented for float4x4 and float3x3 matrices, which are the most common matrices anyway. float2x2 cannot be implemented because the physical layout of float2 doesn't match the physical layout of float2x2 (because a float2x2 is like a float4 internally). Other matrices have the same problems, for instance float4x2 and float2x4 have the same physical layout. They are probably rarely used and not worth the extra complexity.

  • For vectors, I cannot provide the same behavior as swizzling, so it will access the f32[] union and it's up to the compiler to generate the appropriate code. I'd expect a nice compiler to produce nice code if it's just initialization, for other operations I don't really know.

It won't be like hlsl other than in those limited cases, just due to the nature of SIMD and how the library has been designed. If this is acceptable I think I can have it in no time.

from hlslpp.

plekakis avatar plekakis commented on June 10, 2024

from hlslpp.

redorav avatar redorav commented on June 10, 2024

@plekakis Let me know if that works for you or if there's anything else you need

Closed via c275bcf

from hlslpp.

redorav avatar redorav commented on June 10, 2024

Unfortunately it looks like what I've done has upset gcc. I need to find an alternative

from hlslpp.

redorav avatar redorav commented on June 10, 2024

Fixed via 165fe75

I just noticed that GCC in AVX will be broken for the same reason. Since I don't test it I wasn't really aware. This is related to the swizzles. I wonder if there's anything else I can do. Unrelated to this bug but I'll leave a note.

from hlslpp.

plekakis avatar plekakis commented on June 10, 2024

from hlslpp.

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.