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
  • libANGLE
  • renderer
  • gl
  • renderergl_utils.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Work around NVIDIA GLSL vector-scalar op bug · 661fc487
    Olli Etuaho authored Oct 16, 2017
    This adds a new AST transform VectorizeVectorScalarArithmetic. The AST
    transform works around incorrect handling of certain types of GLSL
    arithmetic operations by NVIDIA's GL driver. It works around only the
    most common cases where the bug reproduces, since detecting all the
    cases would take more sophisticated analysis of the code than what
    is currently easily implementable in ANGLE.
    
    When a float add operator has both vector and scalar operands, the AST
    transform turns the scalar operand into a vector operand. Example:
    
    vec4 f;
    f += 1.0;
    
    gets turned into:
    
    vec4 f;
    f += vec4(1.0);
    
    When a vector constructor contains a binary scalar float
    multiplication or division operation as its only argument, the AST
    transform turns both operands of the binary operation into vector
    operands. Example:
    
    float f, g;
    vec4(f * g);
    
    gets turned into:
    
    float f, g;
    vec4(vec4(f) * vec4(g));
    
    Another example with compound assignment:
    
    float f, g;
    vec4(f *= g);
    
    gets turned into:
    
    float f, g;
    vec4 s0 = vec4(f);
    (s0 *= g, f = s0.x), s0;
    
    This latter transformation only works in case the compound assignment
    left hand expression doesn't have side effects.
    
    BUG=chromium:772651
    TEST=angle_end2end_tests
    
    Change-Id: I84ec04287793c56a94845a725785439565debdaf
    Reviewed-on: https://chromium-review.googlesource.com/721321
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    661fc487
renderergl_utils.cpp 57.8 KB
EditWeb IDE
×

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