• Show log

    Commit

  • Hash : fc4fc174
    Author : Shahbaz Youssefi
    Date : 2024-12-10T22:01:28

    Vulkan: Prevent crash with D/S FF without D/S attachment
    
    The spec says that the values for gl_LastFragDepth/StencilARM are
    undefined if there is no depth/stencil attachment.  This "just" works on
    tiling GPUs, because reading input attachments simply translates to
    reading _something_ from the tile memory.
    
    For ANGLE, the situation is a little more complicated.  ANGLE has to
    bind descriptors for input attachments (because non-tilers read from the
    input attachment descriptor instead of using the knowledge that input
    and color/depth/stencil attachments are one and the same thing in tile
    memory).  When a depth/stencil attachment is missing, there is no image
    to bind to the descriptor set.
    
    ANGLE cannot skip binding an image to the descriptor set, because
    OpImageRead (translated from subpassLoad()) attempts to access the
    input descriptor; skipping this causes an internal crash in SwiftShader
    for example.
    
    ANGLE cannot bind a bogus image as input attachment, as Vulkan requires
    that input attachments are also color/depth/stencil attachments.
    
    ANGLE _could_ bind a bogus image as input attachment and also as
    depth/stencil attachment.  This is rather risky, as it then also has to
    be careful to make sure that depth/stencil attachment is never actually
    used (i.e. it affects the depth/stencil state, load/store ops etc).
    
    In this change, the shader itself is modified to remove references to
    the depth/stencil input attachments if the attachment is missing.  This
    is rather inefficient, as it means the pipeline warmup will not produce
    a usable pipeline, but it's accepted as a workaround for something apps
    shouldn't really be doing.
    
    Bug: angleproject:376572258
    Change-Id: I0de68252b61615cb82cba7d1730699aadf41e92f
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6085368
    Reviewed-by: Charlie Lao <cclao@google.com>
    Reviewed-by: Yuxin Hu <yuxinhu@google.com>
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/angle.git
    Git SSH git@git.kmx.io:kc3-lang/angle.git
    Public access ? public
    Description

    A conformant OpenGL ES implementation for Windows, Mac, Linux, iOS and Android.

    Homepage

    Github

    Users
    kc3_lang_org thodg_w www_kmx_io thodg_l thodg thodg_m
    Tags

  • README.md

  • ANGLE back-ends

    This folder contains shared back-end-specific implementation files. The classes and types in renderer are not specified by GLES. They instead are common to all the various ANGLE implementations.

    See renderer_utils.h for various cross back-end utilties.

    ANGLE Formats

    The ANGLE format class, angle::Format, works as a union between GLES and all the various back-end formats. It can represent any type of format in ANGLE. e.g. Formats in Vulkan that don’t exist in GLES, or DXGI formats that don’t exist in GLES, or Windows/Android surface configs that don’t exist anywhere else.

    The glInternalFormat member of angle::Format represents the “closest” GL format for an ANGLE format. For formats that don’t exist in GLES this will not be exactly what the format represents.

    The back-ends also define their own format tables. See the Vulkan Format table docs and the [D3D11 format table docs][D23D11FormatDocs].

    DXGI Format Info

    DXGI formats are used in both the GL and D3D11 back-end. Therefore the generated info table lives in this common shared location.

    The DXGI info table is generated by gen_dxgi_format_table.py and sources data from dxgi_format_data.json. The main purpose of the table is to convert from a DXGI format to an ANGLE format, where the ANGLE format should have all the necessary information.