teawrecks,

you still have additional function calls and overhead wrapping lower level libraries

But it all happens at compile time. That’s the difference.

You probably wouldn’t consider C code non-native

This goes back to your point above:

It’s like when people say a language is “a compiled language” when that doesn’t really have much to do with the language

C is just a language, it’s not native. Native means the binary that will execute on hardware is decided at compile time, in other words, it’s not jitted for the platform it’s running on.

usually you consider compilers that use C as a backend to be native code compilers too

I assume you’re not talking about a compiler that generates C code here, right? If it’s outputting C, then no, it’s not native code yet.

so why would you consider HLSL -> SPIR-V to be any different?

Well first off, games don’t ship with their HLSL (unlike OGL where older games DID have to ship with GLSL), they ship with DXBC/DXIL, which is the DX analog to spir-v (or, more accurately, vice versa).

Shader code is jitted on all PC platforms, yes. This is why I said above that shader code has its own quirks, but on platforms where the graphics API effectively needs to be interpreted at runtime, the shaders have to be jitted twice.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #