mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 18:35:29 +03:00
Fix constbuf updates to actually increment the write offset
Uses the register directly now as when we modify it we want the changes to be visible from macros too.
This commit is contained in:
parent
d2f3479610
commit
7e088ca465
@ -609,8 +609,6 @@ namespace skyline::gpu::interconnect {
|
|||||||
};
|
};
|
||||||
ConstantBuffer constantBufferSelector; //!< The constant buffer selector is used to bind a constant buffer to a stage or update data in it
|
ConstantBuffer constantBufferSelector; //!< The constant buffer selector is used to bind a constant buffer to a stage or update data in it
|
||||||
|
|
||||||
u32 constantBufferUpdateOffset{}; //!< The offset at which any inline constant buffer updata data is written
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void SetConstantBufferSelectorSize(u32 size) {
|
void SetConstantBufferSelectorSize(u32 size) {
|
||||||
constantBufferSelector.size = size;
|
constantBufferSelector.size = size;
|
||||||
@ -644,13 +642,9 @@ namespace skyline::gpu::interconnect {
|
|||||||
return constantBufferSelector;
|
return constantBufferSelector;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetConstantBufferUpdateOffset(u32 offset) {
|
void ConstantBufferUpdate(u32 data, u32 offset) {
|
||||||
constantBufferUpdateOffset = offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConstantBufferUpdate(u32 data) {
|
|
||||||
auto constantBuffer{GetConstantBufferSelector().value()};
|
auto constantBuffer{GetConstantBufferSelector().value()};
|
||||||
constantBuffer.Write(data, constantBufferUpdateOffset);
|
constantBuffer.Write(data, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Shader Program */
|
/* Shader Program */
|
||||||
|
@ -570,10 +570,6 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
|||||||
context.SetTexturePoolMaximumIndex(maximumIndex);
|
context.SetTexturePoolMaximumIndex(maximumIndex);
|
||||||
})
|
})
|
||||||
|
|
||||||
MAXWELL3D_STRUCT_CASE(constantBufferUpdate, offset, {
|
|
||||||
context.SetConstantBufferUpdateOffset(offset);
|
|
||||||
})
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -665,7 +661,8 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
|||||||
|
|
||||||
#define CBUF_UPDATE_CALLBACKS(z, index, data_) \
|
#define CBUF_UPDATE_CALLBACKS(z, index, data_) \
|
||||||
MAXWELL3D_STRUCT_ARRAY_CASE(constantBufferUpdate, data, index, { \
|
MAXWELL3D_STRUCT_ARRAY_CASE(constantBufferUpdate, data, index, { \
|
||||||
context.ConstantBufferUpdate(data); \
|
context.ConstantBufferUpdate(data, registers.constantBufferUpdate->offset); \
|
||||||
|
registers.constantBufferUpdate->offset += 4; \
|
||||||
})
|
})
|
||||||
|
|
||||||
BOOST_PP_REPEAT(16, CBUF_UPDATE_CALLBACKS, 0)
|
BOOST_PP_REPEAT(16, CBUF_UPDATE_CALLBACKS, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user