Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chaitanyassr patch 1 #2

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open

Chaitanyassr patch 1 #2

wants to merge 88 commits into from

Commits on Jan 29, 2020

  1. spirv-fuzz: Make functions "livesafe" during donation (KhronosGroup#3146

    )
    
    This change allows the generator to (optionally and at random) make
    the functions of a module "livesafe" during donation. This involves
    introducing a loop limiter variable to each function and gating the
    number of total loop iterations for the function using that variable.
    It also involves eliminating OpKill and OpUnreachable instructions
    (changing them to OpReturn/OpReturnValue), and clamping access chain
    indices so that they are always in-bounds.
    afd authored Jan 29, 2020
    Configuration menu
    Copy the full SHA
    521223b View commit details
    Browse the repository at this point in the history
  2. spirv-fuzz: Add outlining test (KhronosGroup#3164)

    Adds a test to check that we do outline code that uses pointer
    parameters.
    afd authored Jan 29, 2020
    Configuration menu
    Copy the full SHA
    dd3f8d4 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2020

  1. spirv-fuzz: Arbitrary variable facts (KhronosGroup#3165)

    This change adds a new kind of fact to the fact manager, which records
    when a variable (or pointer parameter) refers to an arbitrary value,
    so that anything can be stored to it, without affecting the observable
    behaviour of the module, and nothing can be guaranteed about values
    loaded from it. Donated modules are the current source of such
    variables, and other transformations, such as outlining, have been
    adapted to propagate these facts appropriately.
    afd authored Jan 30, 2020
    Configuration menu
    Copy the full SHA
    1fc7a9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7a2d408 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2020

  1. Implement constant folding for many transcendentals (KhronosGroup#3166)

    * Implement constant folding for many transcendentals
    
    This change adds support for folding of sin/cos/tan/asin/acos/atan,
    exp/log/exp2/log2, sqrt, atan2 and pow.
    
    The mechanism allows to use any C function to implement folding in the
    future; for now I limited the actual additions to the most commonly used
    intrinsics in the shaders.
    
    Unary folder had to be tweaked to work with extended instructions - for
    extended instructions, constants.size() == 2 and constants[0] ==
    nullptr. This adjustment is similar to the one binary folder already
    performs.
    
    Fixes KhronosGroup#1390.
    
    * Fix Android build
    
    On old versions of Android NDK, we don't get std::exp2/std::log2
    because of partial C++11 support.
    
    We do get ::exp2, but not ::log2 so we need to emulate that.
    zeux authored Feb 3, 2020
    Configuration menu
    Copy the full SHA
    0265a9d View commit details
    Browse the repository at this point in the history
  2. Update CHANGES

    s-perron committed Feb 3, 2020
    Configuration menu
    Copy the full SHA
    ddcc117 View commit details
    Browse the repository at this point in the history
  3. Handle TimeAMD in AmdExtensionToKhrPass. (KhronosGroup#3168)

    This adds support for replacing TimeAMD with OpReadClockKHR.  The scope
    for OpReadClockKHR is fixed to be a subgroup because TimeAMD operates
    only on subgroup.
    dnovillo authored Feb 3, 2020
    Configuration menu
    Copy the full SHA
    a9624b4 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2020

  1. spirv-fuzz: Disallow copying of null and undefined pointers (KhronosG…

    …roup#3172)
    
    If the fuzzer object-copies a pointer we would like to be able to
    perform loads from the copy (and stores to it, if its value is known
    not to matter).  Undefined and null pointers present a problem here,
    so this change disallows copying them.
    afd authored Feb 4, 2020
    Configuration menu
    Copy the full SHA
    b7e0998 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fdd0c87 View commit details
    Browse the repository at this point in the history
  3. spirv-fuzz: Fuzzer pass to add composite types (KhronosGroup#3171)

    Adds a fuzzer pass that randomly adds vector and matrix types not
    already present in the module, and randomly adds structs with random
    field types and arrays with random base types and sizes. Other passes
    will be able to create variables and ids using these types.
    afd authored Feb 4, 2020
    Configuration menu
    Copy the full SHA
    bb56e89 View commit details
    Browse the repository at this point in the history
  4. Update CHANGES

    s-perron committed Feb 4, 2020
    Configuration menu
    Copy the full SHA
    76616ba View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8dd1748 View commit details
    Browse the repository at this point in the history
  6. Start SPIRV-Tools v2020.2

    s-perron committed Feb 4, 2020
    Configuration menu
    Copy the full SHA
    da5457f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a3b5ad9 View commit details
    Browse the repository at this point in the history
  8. utils/vscode: LSP - Support OpExtInst (KhronosGroup#3140)

    This adds language server support for the `GLSL.std.450`, `OpenCL.std` and `OpenCL.DebugInfo.100` extension instructions.
    ben-clayton authored Feb 4, 2020
    Configuration menu
    Copy the full SHA
    9e52bc0 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2020

  1. spirv-fuzz: Fuzzer passes to add local and global variables (KhronosG…

    …roup#3175)
    
    Adds two new fuzzer passes to add variables to a module: one that adds
    Private storage class global variables, another that adds Function
    storage class local variables.
    afd authored Feb 5, 2020
    Configuration menu
    Copy the full SHA
    1f03ac1 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2020

  1. spirv-fuzz: Add fuzzer passes to add loads/stores (KhronosGroup#3176)

    This change adds fuzzer passes that sprinkle loads and stores into a
    module at random, with stores restricted to occur in either dead
    blocks, or to use pointers for which it is known that the pointee
    value does not influence the module's overall behaviour.
    
    The change also generalises the VariableValueIsArbitrary fact to
    PointeeValueIsIrrelevant, to allow stores through access chains or
    object copies of variables whose values are known to be irrelevant.
    
    The change includes some other minor refactorings.
    afd authored Feb 6, 2020
    Configuration menu
    Copy the full SHA
    fe10239 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2020

  1. spirv-fuzz: Ensure that donated variables are always initialized (Khr…

    …onosGroup#3181)
    
    This change ensures that global and local variables donated from other
    modules are always initialized at their declaration in the module
    being transformed.  This is to help limit issues related to undefined
    behaviour that might arise due to accessing uninitialized memory.
    
    The change also introduces some helper functions in fuzzer_util to
    make it easier to find the pointee types of pointer types.
    afd authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    3d4a0dd View commit details
    Browse the repository at this point in the history
  2. spirv-fuzz: Fuzzer pass to add function calls (KhronosGroup#3178)

    Adds a fuzzer pass that inserts function calls into the module at
    random. Calls from dead blocks can be arbitrary (so long as they do
    not introduce recursion), while calls from other blocks can only be to
    livesafe functions.
    
    The change fixes some oversights in transformations to replace
    constants with uniforms and to obfuscate constants which testing of
    this fuzzer pass identified.
    afd authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    77fb303 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2020

  1. spirv-fuzz: Fuzzer pass that adds access chains (KhronosGroup#3182)

    This change adds a fuzzer pass that sprinkles access chain
    instructions into a module at random. This allows other passes to
    have a richer set of pointers available to them, in particular the
    passes that add loads and stores.
    afd authored Feb 11, 2020
    Configuration menu
    Copy the full SHA
    6c218ec View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2020

  1. spirvfuzz: Fix type-related bug, change undef to zero, and add assert (

    …KhronosGroup#3188)
    
    This fixes a bug where the type id of a type instruction, rather than
    its result id, was being used.  It also favours using zero as the
    return value when replacing an OpKill or OpUnreachable with a return
    instruction, and adds a check that the donor module is valid when
    doing module donation.
    
    Fixes KhronosGroup#3187.
    afd authored Feb 14, 2020
    Configuration menu
    Copy the full SHA
    77fefe7 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2020

  1. spirv-val: Add support for SPV_AMD_shader_image_load_store_lod (Khron…

    …osGroup#3186)
    
    According to SPV_AMD_shader_image_load_store_lod spec, Lod operand is
    valid with OpImageRead, OpImageWrite, or OpImageSparseRead if the
    extension is enabled.
    samuelig authored Feb 18, 2020
    Configuration menu
    Copy the full SHA
    4d912f4 View commit details
    Browse the repository at this point in the history
  2. vscode: Add missing fields to schema.Opcode (KhronosGroup#3169)

    These were declared in the `Opcode` struct type, but were never assigned.
    They're not actually used by the language server, but I reused this go schema package for a local experiment and found they were missing.
    ben-clayton authored Feb 18, 2020
    Configuration menu
    Copy the full SHA
    79f8caf View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2020

  1. Configuration menu
    Copy the full SHA
    03794b8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a80497 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2020

  1. Configuration menu
    Copy the full SHA
    dea1040 View commit details
    Browse the repository at this point in the history
  2. Brief guide to writing a spirv-fuzz fuzzer pass (KhronosGroup#3190)

    * Start on walkthrough doc.
    
    * Finished draft of doc.
    afd authored Feb 21, 2020
    Configuration menu
    Copy the full SHA
    03c9eff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c316fb1 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2020

  1. Configuration menu
    Copy the full SHA
    8910ea5 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2020

  1. Combine extinst-name and extinst-output-base into one arg. (KhronosGr…

    …oup#3200)
    
    * Combine the extinst-name and extinst-output-base into one arg.
    
    Some build systems such as Android blueprints require that the inputs
    and outputs of generator scripts are all provided as arguments.  These
    two arguments to generate_language_headers.py are combined to form the
    output path in the script.  This change simply lets the user provide the
    whole output path as an argument.
    
    * Fix typo in build_defs.bzl and update Android.mk
    vonture authored Feb 25, 2020
    Configuration menu
    Copy the full SHA
    fb6e3e4 View commit details
    Browse the repository at this point in the history
  2. Add validation rules for OpenCL.DebugInfo.100 extension (KhronosGroup…

    …#3133)
    
    Add validation rules for DebugCompilationUnit, DebugSource,
    DebugTypeBasic, DebugTypeVector, DebugTypeArray, DebugTypedef,
    DebugTypeFunction, DebugTypeEnum, DebugTypeComposite,
    DebugTypeMember, DebugTypeInheritance, DebugFunction,
    DebugFunctionDeclaration, DebugLexicalBlock, DebugScope,
    DebugLocalVariable, DebugDeclare, DebugExpression.
    jaebaek authored Feb 25, 2020
    Configuration menu
    Copy the full SHA
    70f8881 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2020

  1. Configuration menu
    Copy the full SHA
    661e79e View commit details
    Browse the repository at this point in the history
  2. Avoid use of Python distutils.dir_util (KhronosGroup#3203)

    Required for compatibility with (some?) Python3 installations.
    dneto0 authored Feb 28, 2020
    Configuration menu
    Copy the full SHA
    e1688b6 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2020

  1. Configuration menu
    Copy the full SHA
    a6d3a2d View commit details
    Browse the repository at this point in the history
  2. spirv-fuzz: Fuzzer pass to add equation instructions (KhronosGroup#3202)

    This introduces a new fuzzer pass to add instructions to the module
    that define equations, and support in the fact manager for recording
    equation facts and deducing synonym facts from equation facts.
    
    Initially the only equations that are supported involve OpIAdd,
    OpISub, OpSNegate and OpLogicalNot, but there is scope for adding
    support for equations over various other operators.
    afd authored Mar 4, 2020
    Configuration menu
    Copy the full SHA
    044ecc0 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2020

  1. spirv-fuzz: Add swap commutable operands transformation (KhronosGroup…

    …#3205)
    
    In this PR, the classes that represent the swap commutable operands
    transformation and the fuzzer pass were implemented.
    
    Fixes KhronosGroup#3205.
    afd authored Mar 5, 2020
    Configuration menu
    Copy the full SHA
    66a682b View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2020

  1. spirv-fuzz: Use better function name (KhronosGroup#3207)

    Changes FuzzerPass::MaybeAddTransformationBeforeEachInstruction to
    FuzzerPass::ForEachInstructionWithInstructionDescriptor.
    
    Fixes KhronosGroup#3184.
    afd authored Mar 6, 2020
    Configuration menu
    Copy the full SHA
    da4cd21 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2020

  1. Configuration menu
    Copy the full SHA
    533af49 View commit details
    Browse the repository at this point in the history
  2. spirv-fuzz: Add toggle access chain instruction transformation (Khron…

    …osGroup#3211)
    
    In this PR, the classes that represent the toggle access chain
    instruction transformation and fuzzer pass were implemented. This
    transformation toggles the instructions OpAccessChain and
    OpInBoundsAccessChain between them.
    
    Fixes KhronosGroup#3193.
    andreperezmaselco authored Mar 8, 2020
    Configuration menu
    Copy the full SHA
    4c02704 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2020

  1. spirv-fuzz: Allow OpPhi operand to be replaced with a composite synon…

    …ym (KhronosGroup#3221)
    
    In this PR, the class FuzzerPassApplyIdSynonyms was updated to allow OpPhi operand to be replaced with a composite synonym.
    
    Fixes KhronosGroup#3209.
    andreperezmaselco authored Mar 9, 2020
    Configuration menu
    Copy the full SHA
    6594704 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c3de21 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dd3d916 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2020

  1. Configuration menu
    Copy the full SHA
    1af1df3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6428ad0 View commit details
    Browse the repository at this point in the history
  3. Instrument: Debug Printf support (KhronosGroup#3215)

    Create a pass to instrument OpDebugPrintf instructions.  This pass replaces all OpDebugPrintf instructions with instructions to write a record containing the string id and the all specified values into a special printf output buffer (if space allows). This pass is designed to support the printf validation in the Vulkan validation layers.
    
    Fixes KhronosGroup#3210
    greg-lunarg authored Mar 12, 2020
    Configuration menu
    Copy the full SHA
    1fe9bcc View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2020

  1. Configuration menu
    Copy the full SHA
    7a8f797 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2020

  1. Roll external/spirv-headers/ 30ef660..a17e17e (1 commit) (KhronosGrou…

    …p#3230)
    
    KhronosGroup/SPIRV-Headers@30ef660...a17e17e
    
    $ git log 30ef660..a17e17e --date=short --no-merges --format='%ad %ae %s'
    2020-03-13 jmadill Add missing header to BUILD.gn.
    
    Created with:
      roll-dep external/spirv-headers
    null77 authored Mar 16, 2020
    Configuration menu
    Copy the full SHA
    25ede1c View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2020

  1. Add support for KHR_ray_{query,tracing} extensions (KhronosGroup#3235)

    Update validator for SPV_KHR_ray_tracing.
    
    * Added handling for new enum types
    * Add SpvScopeShaderCallKHR as a valid scope
    * update spirv-headers
    
    Co-authored-by: alelenv <[email protected]>
    Co-authored-by: Torosdagli <[email protected]>
    Co-authored-by: Tobias Hector <[email protected]>
    Co-authored-by: Steven Perron <[email protected]>
    5 people authored Mar 17, 2020
    Configuration menu
    Copy the full SHA
    5a97e3a View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2020

  1. Configuration menu
    Copy the full SHA
    18d3896 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2020

  1. Add RayQueryProvisionalKHR to opt types (KhronosGroup#3239)

    Add missing RayQueryProvisionalKHR types
    jiaolu authored Mar 19, 2020
    Configuration menu
    Copy the full SHA
    da52d08 View commit details
    Browse the repository at this point in the history
  2. Add opt::Operand::AsCString and AsString (KhronosGroup#3240)

    It only works when the operand is a literal string.
    dneto0 authored Mar 19, 2020
    Configuration menu
    Copy the full SHA
    60104cd View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2020

  1. Make file formatting comply with POSIX standards (KhronosGroup#3242)

    Add newlines to two files
    aaronfranke authored Mar 23, 2020
    Configuration menu
    Copy the full SHA
    7f341ff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e6f372c View commit details
    Browse the repository at this point in the history
  3. Add data structure for DebugScope, DebugDeclare in spirv-opt (Khronos…

    …Group#3183)
    
    When DebugScope is given in SPIR-V, each instruction following the
    DebugScope is from the lexical scope pointed by the DebugScope in
    the high level language. We add DebugScope struction to keep the
    scope information in Instruction class. When ir_loader loads
    DebugScope/DebugNoScope, it keeps the scope information in
    |last_dbg_scope_| and lets following instructions have that scope
    information.
    
    In terms of DebugDeclare/DebugValue, if it is in a function body
    but outside of a basic block, we keep it in |debug_insts_in_header_|
    of Function class. If it is in a basic block, we keep it as a normal
    instruction i.e., in a instruction list of BasicBlock.
    jaebaek authored Mar 23, 2020
    Configuration menu
    Copy the full SHA
    1c8bda3 View commit details
    Browse the repository at this point in the history
  4. Disallow phis of images, samplers and sampled images (KhronosGroup#3246)

    * Disallow phis of sampled images always
    * Disallow phis of samplers and images for shaders
    * Add tests
    * Gate check to only occur post-legalization
    alan-baker authored Mar 23, 2020
    Configuration menu
    Copy the full SHA
    1346dd5 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2020

  1. Fix identification of Vulkan images and buffers (KhronosGroup#3253)

    Fixes KhronosGroup#3252
    
    * Image and buffer queries did not account for optional level of
    arrayness on the variable
      * new tests
    alan-baker authored Mar 25, 2020
    Configuration menu
    Copy the full SHA
    022da4d View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2020

  1. Update CHANGES

    s-perron committed Mar 26, 2020
    Configuration menu
    Copy the full SHA
    3ef8fe9 View commit details
    Browse the repository at this point in the history
  2. Finalize SPIRV-Tools v2020.2

    s-perron committed Mar 26, 2020
    Configuration menu
    Copy the full SHA
    fd8e130 View commit details
    Browse the repository at this point in the history
  3. Start SPIRV-Tools v2020.3

    s-perron committed Mar 26, 2020
    Configuration menu
    Copy the full SHA
    fd773eb View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2020

  1. Configuration menu
    Copy the full SHA
    c37c949 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2020

  1. Set wrapped kill basic block's parent (KhronosGroup#3269)

    Fixes KhronosGroup#3268
    
    * Set the parent of the basic block for the wrapper function
    * Add a test
    alan-baker authored Apr 1, 2020
    Configuration menu
    Copy the full SHA
    f20c0d7 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2020

  1. Update dominates to check for null nodes (KhronosGroup#3271)

    * Update dominates to check for null nodes
    
    Fixes KhronosGroup#3270
    alan-baker authored Apr 2, 2020
    Configuration menu
    Copy the full SHA
    af01d57 View commit details
    Browse the repository at this point in the history
  2. spirv-fuzz: Add validator options (KhronosGroup#3254)

    Allows several validator options to be passed to the fuzzer, to be
    used when validation is invoked during fuzzing.
    afd authored Apr 2, 2020
    Configuration menu
    Copy the full SHA
    2fdea57 View commit details
    Browse the repository at this point in the history
  3. spirv-fuzz: Introduce TransformationContext (KhronosGroup#3272)

    Some transformations (e.g. TransformationAddFunction) rely on running
    the validator to decide whether the transformation is applicable.  A
    recent change allowed spirv-fuzz to take validator options, to cater
    for the case where a module should be considered valid under
    particular conditions.  However, validation during the checking of
    transformations had no access to these validator options.
    
    This change introduced TransformationContext, which currently consists
    of a fact manager and a set of validator options, but could in the
    future have other fields corresponding to other objects that it is
    useful to have access to when applying transformations.  Now, instead
    of checking and applying transformations in the context of a
    FactManager, a TransformationContext is used.  This gives access to
    the fact manager as before, and also access to the validator options
    when they are needed.
    afd authored Apr 2, 2020
    Configuration menu
    Copy the full SHA
    8d4261b View commit details
    Browse the repository at this point in the history
  4. spirv-fuzz: Only replace regular ids with synonyms (KhronosGroup#3255)

    Fixes an issue where an id use in a non-regular context, e.g. as a
    scope parameter to an atomic instruction, would be replaced with a
    synonym.
    afd authored Apr 2, 2020
    Configuration menu
    Copy the full SHA
    f28cdef View commit details
    Browse the repository at this point in the history
  5. spirv-fuzz: Limit adding of new variables to 'basic' types (KhronosGr…

    …oup#3257)
    
    To avoid problems where global and local variables of opaque or
    runtime-sized types are added to a module, this change introduces the
    notion of a 'basic type' -- a type made up from floats, ints, bools,
    or vectors, matrices, structs and fixed-size arrays of basic types.
    Added variables have to be of basic type.
    afd authored Apr 2, 2020
    Configuration menu
    Copy the full SHA
    bfd25ac View commit details
    Browse the repository at this point in the history
  6. spirv-fuzz: Handle isomorphic types property in composite construction (

    KhronosGroup#3262)
    
    The fuzzer pass that constructs composites had an issue where it would
    regard isomorphic but distinct structs (similarly arrays) as being
    interchangeable when constructing composites.  This change fixes the
    problem by relying less on the type manager.
    afd authored Apr 2, 2020
    Configuration menu
    Copy the full SHA
    5d491a7 View commit details
    Browse the repository at this point in the history
  7. spirv-fuzz: Transformation to add OpConstantNull (KhronosGroup#3273)

    Adds a transformation for adding OpConstantNull to a module, for
    appropriate data types.
    afd authored Apr 2, 2020
    Configuration menu
    Copy the full SHA
    e95fbfb View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2020

  1. spirv-fuzz: Improve support for compute shaders in donation (KhronosG…

    …roup#3277)
    
    (1) Runtime arrays are turned into fixed-size arrays, by turning
        OpTypeRuntimeArray into OpTypeArray and uses of OpArrayLength into
        uses of the constant used for the length of the fixed-size array.
    
    (2) Atomic instructions are not donated, and uses of their results are
        replaced with uses of constants of the result type.
    afd authored Apr 6, 2020
    Configuration menu
    Copy the full SHA
    4af38c4 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2020

  1. spirv-fuzz: Handle more general SPIR-V in donation (KhronosGroup#3280)

    This change increases the extent to which arbitrary SPIR-V can be used
    by the fuzzer pass that donates modules. It handles the case where
    various ingredients (such as types, variables and particular
    instructions) cannot be donated by omitting them, and then either
    omitting their dependencies or replacing their dependencies with
    alternative instructions.
    
    The change pays particular attention to allowing code that manipulates
    image types to be handled (by skipping anything image-specific).
    afd authored Apr 7, 2020
    Configuration menu
    Copy the full SHA
    183e324 View commit details
    Browse the repository at this point in the history
  2. spirv-fuzz: Improve the handling of equation facts (KhronosGroup#3281)

    The management of equation facts suffered from two problems:
    
    (1) The processing of an equation fact required the data descriptors
        used in the equation to be in canonical form.  However, during
        fact processing it can be deduced that certain data descriptors
        are equivalent, causing their equivalence classes to be merged,
        and that could cause previously canonical data descriptors to no
        longer be canonical.
    
    (2) Related to this, if id equations were known about a canonical data
        descriptor dd1, and other id equations known about a different
        canonical data descriptor dd2, the equation facts about these data
        descriptors were not being merged in the event that dd1 and dd2
        were deduced to be equivalent.
    
    This changes solves (1) by not requiring equation facts to be in
    canonical form while processing them, but instead always checking
    whether (not necessary canonical) data descriptors are equivalent when
    looking for corollaries of equation facts, rather than comparing them
    using ==.
    
    Problem (2) is solved by adding logic to merge sets of equations when
    data descriptors are made equivalent.
    
    In addition, the change also requires elements to be registered in an
    equivalence relation before they can be made equivalent, rather than
    being added (if not already present) at the point of being made
    equivalent.
    afd authored Apr 7, 2020
    Configuration menu
    Copy the full SHA
    538512e View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2020

  1. Configuration menu
    Copy the full SHA
    d0490ef View commit details
    Browse the repository at this point in the history
  2. Handle more cases in dead member elim (KhronosGroup#3289)

    * Handle more cases in dead member elim
    
    - Rewrite composite insert and extract operations on SpecConstnatOp.
    - Leaves assert for Access chain instructions, which are only allowed
    for kernels.
    - Other operations do not require any extra code will no longer cause an
    assert.
    
    Fixes KhronosGroup#3284.
    Fixes KhronosGroup#3282.
    s-perron authored Apr 9, 2020
    Configuration menu
    Copy the full SHA
    34be233 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2020

  1. Configuration menu
    Copy the full SHA
    c531099 View commit details
    Browse the repository at this point in the history
  2. Preserve debug info in eliminate-dead-functions (KhronosGroup#3251)

    * Preserve debug info in eliminate-dead-functions
    
    The elimination of dead functions makes OpFunction operand of
    DebugFunction invalid. This commit replaces the operand with
    DebugInfoNone.
    jaebaek authored Apr 13, 2020
    Configuration menu
    Copy the full SHA
    000040e View commit details
    Browse the repository at this point in the history
  3. Struct CFG analysus and single block loop (KhronosGroup#3293)

    Loop headers must be marked as in the continue if the loop header is
    also the continue target.
    
    Fixes KhronosGroup#3264
    s-perron authored Apr 13, 2020
    Configuration menu
    Copy the full SHA
    e70d25f View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. If SPIRV-Headers is in our tree, include it as subproject (KhronosGro…

    …up#3299)
    
    This allows enclosing projects to use SPIRV-Headers_SOURCE_DIR
    to set up in header includes.
    dneto0 authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    ca57515 View commit details
    Browse the repository at this point in the history
  2. Add tests for recently added command line option (KhronosGroup#3297)

    We have not added tests for the new command line options recently.  I've
    updated the test and fixed on option that was incorrect.
    
    Fixes KhronosGroup#3247
    s-perron authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    4956644 View commit details
    Browse the repository at this point in the history
  3. Remove implicit fallthrough (KhronosGroup#3298)

    Fixes KhronosGroup#3296
    
    * Make OpReturn its own case fully
    alan-baker authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    2a2bdbd View commit details
    Browse the repository at this point in the history
  4. Sampled images as read-only storage (KhronosGroup#3295)

    There are some cases where a variable that is declared as a sampled
    image could be read only.  That is when the image type has sampled == 1.
    
    Fixes KhronosGroup#3288
    s-perron authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    7d65bce View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ce2db1 View commit details
    Browse the repository at this point in the history
  6. spirv-fuzz: Respect rules for OpSampledImage (KhronosGroup#3287)

    The SPIR-V data rules say that all uses of an OpSampledImage
    instruction must be in the same block as the instruction, and highly
    restrict those instructions that can consume the result id of an
    OpSampledImage.
    
    This adapts the transformations that split blocks and create synonyms
    to avoid separating an OpSampledImage use from its definition, and to
    avoid synonym-creation instructions such as OpCopyObject consuming an
    OpSampledImage result id.
    afd authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    f82d470 View commit details
    Browse the repository at this point in the history
  7. spirv-fuzz: Handle image storage class in donation (KhronosGroup#3290)

    Demotes the image storage class to Private during donation.  Also
    fixes an issue where instructions that depended on non-donated global
    values would not be handled properly.
    afd authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    2f18046 View commit details
    Browse the repository at this point in the history
  8. spirv-fuzz: Handle OpRuntimeArray when replacing ids with synonyms (K…

    …hronosGroup#3292)
    
    Provides support for runtime arrays in the code that traverses
    composite types when checking applicability of transformations that
    replace ids with synonyms.
    afd authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    f460cca View commit details
    Browse the repository at this point in the history
  9. spirv-fuzz: Do not outline regions that produce pointer outputs (Khro…

    …nosGroup#3291)
    
    The function outliner uses a struct to return ids that a region
    generates and that are used outside that region.  If these ids have
    pointer type this would result in a struct with pointer members, which
    leads to illegal loading from non-logical pointers if logical
    addressing is used.  This change bans that outlining possibility.
    afd authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    c018fc6 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2020

  1. spirv-fuzz: Fix to outliner (KhronosGroup#3302)

    Adds an extra condition on when a region can be outlined to avoid the
    case where a region ends with a loop head but such that the loop's
    continue target is in the region.  (Outlining such a region would mean
    that the loop merge is in the original function and the continue target
    in the outlined function.)
    afd authored Apr 15, 2020
    Configuration menu
    Copy the full SHA
    ed96301 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    61b7de3 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2020

  1. Configuration menu
    Copy the full SHA
    4226b7d View commit details
    Browse the repository at this point in the history