Skip to content
Snippets Groups Projects

vkd3d-shader/hlsl: Implement struct single inheritance

Merged Shaun Ren requested to merge shaunren/vkd3d:struct-inheritance into master
  1. Oct 16, 2024
    • Shaun Ren's avatar
      vkd3d-shader/hlsl: Implement struct single inheritance. · 069b8aac
      Shaun Ren authored
      Here, we implement single inheritance by inserting a field at the
      beginning of the derived struct with name "$super".
      
      For the following struct declarations
      
        struct a
        {
            float4 aa;
            float4 bb;
        };
      
        struct b : a
        {
            float4 cc;
        };
      
        struct c : b
        {
            float4 bb;
        };
      
      this commit generates the following:
      
        struct a
        {
            float4 aa;
            float4 bb;
        };
      
        struct b
        {
            struct a $super;
            float4 cc;
        };
      
        struct c
        {
            struct b $super;
            float4 bb;
        };
      069b8aac
    • Shaun Ren's avatar
      tests: Test struct single inheritance. · 013e354b
      Shaun Ren authored
      013e354b
Loading