https://github.com/shader-slang/slang
Raw File
Tip revision: 768e62f6c7541439e2edc18dad5fb3846d2e05f9 authored by Yong He on 10 October 2022, 22:59:45 UTC
Support multi-level break + single-return conversion + general inline. (#2436)
Tip revision: 768e62f
slang-ir-byte-address-legalize.h
// slang-ir-byte-address-legalize.h
#pragma once

namespace Slang
{
class Session;
class TargetRequest;
struct IRModule;

struct ByteAddressBufferLegalizationOptions
{
    bool scalarizeVectorLoadStore = false;
    bool useBitCastFromUInt = false;
    bool translateToStructuredBufferOps = false;
};

    /// Legalize byte-address buffer `Load()` and `Store()` operations.
    ///
    /// This function translates load/store operations that involve
    /// aggregate types into primitive load-store operations on
    /// scalar or vector types.
    ///
void legalizeByteAddressBufferOps(
    Session*                                    session,
    TargetRequest*                              target,
    IRModule*                                   module,
    ByteAddressBufferLegalizationOptions const& options);
}

back to top