https://github.com/shader-slang/slang
Raw File
Tip revision: 5902acdabc4445a65741a7a6a3a95f223e301059 authored by Yong He on 23 January 2024, 07:19:40 UTC
[LSP] Fetch configs directly from didConfigurationChanged message. (#3478)
Tip revision: 5902acd
slang-ir-extract-value-from-type.h
// slang-ir-extract-value-from-type.h
#pragma once

#include "slang-ir.h"
#include "slang-type-layout.h"

namespace Slang
{

// Emit code using builder that yields an `IRInst` representing a value of `size` bytes
// starting at `offset` in `src`. `src` must be a value of `struct`, array, vector or basic type.
// `size` can be either 1, 2 or 4. The resulting `IRInst` value will have an `uint` type.
IRInst* extractValueAtOffset(
    IRBuilder& builder, TargetRequest* targetReq, IRInst* src, uint32_t offset, uint32_t size);

}
back to top