VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders.

This commit is contained in:
Fernando Sahmkow
2019-09-23 14:02:02 -04:00
committed by FernandoS27
parent 2ef696c85a
commit 1a58f45d76
13 changed files with 187 additions and 15 deletions

View File

@ -70,7 +70,8 @@ Texture::FullTextureInfo KeplerCompute::GetTextureInfo(const Texture::TextureHan
GetTSCEntry(tex_handle.tsc_id)};
}
u32 KeplerCompute::AccessConstBuffer32(u64 const_buffer, u64 offset) const {
u32 KeplerCompute::AccessConstBuffer32(ShaderType stage, u64 const_buffer, u64 offset) const {
ASSERT(stage == ShaderType::Compute);
const auto& buffer = launch_description.const_buffer_config[const_buffer];
u32 result;
std::memcpy(&result, memory_manager.GetPointer(buffer.Address() + offset), sizeof(u32));