Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • tests
  • gl_tests
  • VertexAttributeTest.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Vulkan: Support vertex attribute aliasing for matrix types · d7475437
    Shahbaz Youssefi authored Oct 20, 2020
    This change builds on vertex attribute aliasing SPIR-V tranformation for
    non-matrix types to add support for matrix attribute types.  This is
    done by turning every matrix attribute declaration into multiple vector
    attribute declarations, and reusing the same mechanism for resolving
    aliasing between non-matrix types.
    
    Take the following example:
    
        attribute mat4 a; // location 0
        attribute vec3 b; // location 1
    
        attribute mat3 c; // location 1
        attribute vec4 d; // location 2
    
    The shader is modified as such:
    
        attribute vec4 a_0; // location 0
        attribute vec4 a_1; // location 1
        attribute vec4 a_2; // location 2
        attribute vec4 a_3; // location 3
    
        attribute vec3 c_0; // location 4
        attribute vec4 d;   // location 5
        attribute vec3 c_2; // location 6
    
        mat4 a;
        mat3 c;
    
    and in the beginning of main(), the following code is inserted:
    
        a = mat4(a_0, a_1, a_2, a_3);
        c = mat3(c_0, d.xyz, c_2);
    
    The shader continues to use a and c as before.
    
    Bug: angleproject:4249
    Change-Id: Idfcb8c6037ca0c1f21de8203d7e2a1b66fed6e7e
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488128
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    Reviewed-by: 's avatarCharlie Lao <cclao@google.com>
    Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
    d7475437
VertexAttributeTest.cpp 125 KB
EditWeb IDE
×

Replace VertexAttributeTest.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.