mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 04:54:17 +01:00
Return a null handle when reading from an unbound cbuf
This commit is contained in:
parent
8d9b0041b4
commit
0b551e04db
@ -77,6 +77,9 @@ namespace skyline::gpu::interconnect {
|
||||
|
||||
static BindlessHandle ReadBindlessHandle(InterconnectContext &ctx, auto &constantBuffers, const auto &desc, size_t arrayIdx) {
|
||||
ConstantBuffer &primaryCbuf{constantBuffers[desc.cbuf_index]};
|
||||
if (!primaryCbuf.view)
|
||||
return { .raw = 0 };
|
||||
|
||||
size_t elemOffset{arrayIdx << desc.size_shift};
|
||||
size_t primaryCbufOffset{desc.cbuf_offset + elemOffset};
|
||||
u32 primaryVal{primaryCbuf.Read<u32>(ctx.executor, primaryCbufOffset)};
|
||||
|
Loading…
Reference in New Issue
Block a user