Skip to content
Snippets Groups Projects
  1. Nov 08, 2023
  2. Nov 02, 2023
  3. Oct 31, 2023
  4. Oct 12, 2023
  5. Sep 26, 2023
  6. Sep 22, 2023
  7. Sep 21, 2023
  8. Sep 13, 2023
  9. Aug 30, 2023
  10. Aug 15, 2023
    • Francisco Casas's avatar
      vkd3d-shader/d3dbc: Use the bind count instead of the allocation size in d3dbc.c. · 96f66aa4
      Francisco Casas authored and Alexandre Julliard's avatar Alexandre Julliard committed
      This should have no effect, since in SM1 the allocation size is the
      same as the bind count because there are no texture registers.
      It is just done for consistency.
      96f66aa4
    • Francisco Casas's avatar
      vkd3d-shader/hlsl: Rename hlsl_reg.bind_count to hlsl_reg.allocation_size. · 7eba0631
      Francisco Casas authored and Alexandre Julliard's avatar Alexandre Julliard committed
      We have to distinguish between the "bind count" and the "allocation size"
      of variables.
      
      The "allocation size" affects the starting register id for the resource to
      be allocated next, while the "bind count" is determined by the last field
      actually used. The former may be larger than the latter.
      
      What we are currently calling hlsl_reg.bind_count is actually the
      "allocation size", so a rename is in order.
      
      The real "bind count", which will be introduced in following patches,
      is important because it is what should be shown in the RDEF table and
      some resource allocation rules depend on it.
      
      For instance, for this shader:
      
          texture2D texs[3];
          texture2D tex;
      
          float4 main() : sv_target
          {
              return texs[0].Load(int3(0, 0, 0)) + tex.Load(int3(0, 0, 0));
          }
      
      the variable "texs" has a "bind count" of 1, but an "allocation size" of
      3:
      
          // Resource Bindings:
          //
          // Name                                 Type  Format         Dim      HLSL Bind  Count
          // ------------------------------ ---------- ------- ----------- -------------- ------
          // texs                              texture  float4          2d             t0      1
          // tex                               texture  float4          2d             t3      1
      7eba0631
  11. Aug 03, 2023
  12. Aug 02, 2023
  13. Jul 17, 2023
  14. Jul 04, 2023
  15. Jun 27, 2023
  16. Jun 22, 2023
    • Francisco Casas's avatar
      vkd3d-shader/d3dbc: Avoid hlsl_type_get_regset() in d3dbc.c. · c1ca0daf
      Francisco Casas authored and Alexandre Julliard's avatar Alexandre Julliard committed
      In SM1 we can expect all variables to always belong to a single regset.
      structs in particular, should always be allocated to HLSL_REGSET_NUM,
      since they are only allowed if all their components are numeric.
      
      We are not covering the structs case because of the use of
      hlsl_type_get_regset(), which is currently not defined for structs.
      
      So the current shader
      
          struct
          {
              float4 a;
              float4 b;
          } apple;
      
          float4 main() : sv_target
          {
              return apple.a + apple.b;
          }
      
      fails with
      
          vkd3d/libs/vkd3d-shader/hlsl.c:224: Aborting, reached unreachable code.
      
      The solution is to iterate over all regsets to find the one where the
      variable is allocated (if any), and ignore all others.
      c1ca0daf
  17. May 09, 2023
  18. May 08, 2023
  19. May 03, 2023
  20. May 01, 2023
  21. Apr 28, 2023
  22. Apr 20, 2023
  23. Apr 12, 2023
Loading