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
  • compiler
  • translator
  • ImageFunctionHLSL.cpp
Find file
BlameHistoryPermalink
  • Xinghua Cao's avatar
    ES31: Use indices to access image variables in built-in image functions · 06a22620
    Xinghua Cao authored May 18, 2018
    In order to implement glBindImageTexture to bind a layer of 3D/2DArray/Cube
    texture, use indices to access image variables when translating built-in
    image functions.
    There is a conflict when transferring image2D/iimage2D/uimage2D variables to
    an user defined function. For example,
    layout(r32ui, binding = 0) readonly uniform highp uimage2D uImage_1;
    layout(r32ui, binding = 1) readonly uniform highp uimage2D uImage_2;
    uvec4 lod_fun(uimage2D img, ivec2 p)
    {
        return imageLoad(img, p);
    }
    void main()
    {
        uvec4 value_1 = lod_fun(uImage_1, ivec2(gl_LocalInvocationID.xy));
        uvec4 value_2 = lod_fun(uImage_2, ivec2(gl_LocalInvocationID.xy));
    }
    If uImage_1 binds to a 2D texture, and uImage_2 binds to a layer of 3D texture,
    uImage_1 will be translated to Texture2D type, and uImage_2 will be translated to
    Texture3D type, "img" type of lod_fun will be translated Texture2D, so uImage_2
    cannot be transferred to lod_fun as a parameter.
    Indices without Texture/RWTexture information could handle this situation easily.
    
    BUG=angleproject:1987
    TEST=angle_end2end_tests.ComputeShaderTest.*
    
    Change-Id: I7647395f0042f613c5d6e9eeb49392ab6252e21e
    Reviewed-on: https://chromium-review.googlesource.com/1065797
    Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
    Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
    06a22620
ImageFunctionHLSL.cpp 10.5 KB
EditWeb IDE
×

Replace ImageFunctionHLSL.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.