mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-30 03:04:17 +01:00
Use TIC maximum index over TSC when tscIndexLinked is set
This commit is contained in:
parent
8e021a9f1f
commit
d08ac63bbf
@ -1213,7 +1213,7 @@ namespace skyline::gpu::interconnect {
|
||||
if (tscIndexLinked)
|
||||
handle.samplerIndex = handle.textureIndex;
|
||||
|
||||
auto sampler{GetSampler(handle.samplerIndex)};
|
||||
auto sampler{GetSampler(handle.samplerIndex, tscIndexLinked)};
|
||||
auto textureView{GetPoolTextureView(handle.textureIndex)};
|
||||
|
||||
std::scoped_lock lock(*textureView);
|
||||
@ -2374,6 +2374,7 @@ namespace skyline::gpu::interconnect {
|
||||
|
||||
void SetTscIndexLinked(bool isTscIndexLinked) {
|
||||
tscIndexLinked = isTscIndexLinked;
|
||||
samplerPool.samplerControls = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -2490,9 +2491,9 @@ namespace skyline::gpu::interconnect {
|
||||
return vk::BorderColor::eFloatTransparentBlack;
|
||||
}
|
||||
|
||||
std::shared_ptr<Sampler> GetSampler(u32 index) {
|
||||
std::shared_ptr<Sampler> GetSampler(u32 index, bool tscIndexLinked) {
|
||||
if (!samplerPool.samplerControls.valid()) {
|
||||
auto mappings{channelCtx.asCtx->gmmu.TranslateRange(samplerPool.iova, samplerPool.maximumIndex * sizeof(TextureSamplerControl))};
|
||||
auto mappings{channelCtx.asCtx->gmmu.TranslateRange(samplerPool.iova, (tscIndexLinked ? texturePool.maximumIndex : samplerPool.maximumIndex) * sizeof(TextureSamplerControl))};
|
||||
if (mappings.size() != 1)
|
||||
throw exception("Sampler pool mapping count is unexpected: {}", mappings.size());
|
||||
samplerPool.samplerControls = mappings.front().cast<TextureSamplerControl>();
|
||||
|
Loading…
Reference in New Issue
Block a user