don't bind textures when framebuffer fetched

This commit is contained in:
Samuliak 2025-01-09 16:09:02 +01:00
parent 6d1d739de5
commit 03ec23140b
No known key found for this signature in database

View file

@ -1926,6 +1926,11 @@ void MetalRenderer::BindStageResources(MTL::RenderCommandEncoder* renderCommandE
{ {
const auto relative_textureUnit = shader->resourceMapping.getTextureUnitFromBindingPoint(i); const auto relative_textureUnit = shader->resourceMapping.getTextureUnitFromBindingPoint(i);
auto hostTextureUnit = relative_textureUnit; auto hostTextureUnit = relative_textureUnit;
// Don't bind textures that are accessed with a framebuffer fetch
if (shader->textureRenderTargetIndex[relative_textureUnit] != 255)
continue;
auto textureDim = shader->textureUnitDim[relative_textureUnit]; auto textureDim = shader->textureUnitDim[relative_textureUnit];
auto texUnitRegIndex = hostTextureUnit * 7; auto texUnitRegIndex = hostTextureUnit * 7;
switch (shader->shaderType) switch (shader->shaderType)