From cd3ba38ebfdd57a76fec6c8761bbe45289919ae6 Mon Sep 17 00:00:00 2001 From: Ravbug Date: Wed, 10 Jul 2024 10:46:14 -0700 Subject: [PATCH] MTL: bindless textures sort of work --- deps/ShaderTranspiler | 2 +- src/MTLCommandBuffer.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ShaderTranspiler b/deps/ShaderTranspiler index 9a090eb..2b4b851 160000 --- a/deps/ShaderTranspiler +++ b/deps/ShaderTranspiler @@ -1 +1 @@ -Subproject commit 9a090eba9c3306d03afb83418a050218e4c4fa5c +Subproject commit 2b4b851d35bb1df424644358288db2bdf1ec3737 diff --git a/src/MTLCommandBuffer.mm b/src/MTLCommandBuffer.mm index bba8468..c9cd04b 100644 --- a/src/MTLCommandBuffer.mm +++ b/src/MTLCommandBuffer.mm @@ -278,7 +278,7 @@ uint32_t bytesPerPixel(MTLPixelFormat format){ [currentComputeCommandEncoder setSamplerState:std::static_pointer_cast(sampler)->sampler atIndex:index]; } -constexpr static uint32_t bindlessOffset = 1; +constexpr static uint32_t bindlessOffset = 0; void CommandBufferMTL::SetVertexTexture(const TextureView& view, uint32_t index){ if (view.texture.mtl.representsBindless){