mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Implement linked TIC/TSC handle in Maxwell3D
Maxwell3D has a register for linking the TIC/TSC index in bindless texture handles, this is used by games to implement bindless combined texture-sampler handles.
This commit is contained in:
@ -1176,6 +1176,8 @@ namespace skyline::gpu::interconnect {
|
||||
|
||||
auto &constantBuffer{pipelineStage.constantBuffers[texture.cbuf_index]};
|
||||
BindlessTextureHandle handle{constantBuffer.Read<u32>(executor, texture.cbuf_offset)};
|
||||
if (tscIndexLinked)
|
||||
handle.samplerIndex = handle.textureIndex;
|
||||
|
||||
auto sampler{GetSampler(handle.samplerIndex)};
|
||||
auto textureView{GetPoolTextureView(handle.textureIndex)};
|
||||
@ -2292,6 +2294,8 @@ namespace skyline::gpu::interconnect {
|
||||
|
||||
/* Samplers */
|
||||
private:
|
||||
bool tscIndexLinked{}; //!< If the TSC index in bindless texture handles is the same as the TIC index or if it's independent from the TIC index
|
||||
|
||||
struct Sampler : public vk::raii::Sampler, public FenceCycleDependency {
|
||||
using vk::raii::Sampler::Sampler;
|
||||
};
|
||||
@ -2319,6 +2323,10 @@ namespace skyline::gpu::interconnect {
|
||||
samplerPool.samplerControls = nullptr;
|
||||
}
|
||||
|
||||
void SetTscIndexLinked(bool isTscIndexLinked) {
|
||||
tscIndexLinked = isTscIndexLinked;
|
||||
}
|
||||
|
||||
private:
|
||||
vk::Filter ConvertSamplerFilter(TextureSamplerControl::Filter filter) {
|
||||
using TscFilter = TextureSamplerControl::Filter;
|
||||
|
Reference in New Issue
Block a user