Skip to content

VertexLayoutDesc hash computation #2827

@solan-solan

Description

@solan-solan
  • axmol version: dev
  • devices test on:
  • developing environments
    • NDK version: r23c
    • Xcode version: 14.2+
    • Visual Studio:
      • VS version: 2022 (17.9+)
      • MSVC version: 19.39+
      • Windows SDK version: 10.0.22621.0+
    • cmake version:
      Steps to Reproduce:

There is an issue for me to render two similar objects according to their attributes but different strides. It looks like the issue has gone if stride is taken into account for hash

void VertexLayoutDesc::endLayout(int stride)
{
    if (stride != -1)
        _strides[0] = stride;
    // compute hash
    _hash = XXH32(_bindings.data(), _bindings.size() * sizeof(InputBindingDesc), _strides[0]);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions