https://github.com/shader-slang/slang
Raw File
Tip revision: 911a4401b08f6199e18b32349c236c186a2dd128 authored by Yong He on 02 November 2023, 21:54:22 UTC
Fix crash when writing to `no_diff` out parameter. (#3308)
Tip revision: 911a440
slang-ir-specialize-arrays.h
// slang-ir-specialize-arrays.h
#pragma once

namespace Slang
{
    struct CodeGenContext;
    struct IRModule;

    /// Specialize calls to functions that take parameters of
    /// `struct` type with array fields.
    ///
    /// For any function that has such input parameters, this pass
    /// will rewrite any call sites that pass suitable arguments
    /// (e.g., direct references to global shader parameters) to
    /// instead call a specialized variant of the function that does
    /// not have those array parameters, if the array can be referenced
    /// from global shader parameters directly.
    /// This is an optimization for GL/VK backend since the downstream
    /// compiler doesn't seem to optimize such code well.
    void specializeArrayParameters(
        CodeGenContext* codeGenContext,
        IRModule*       module);
}
back to top