From bb22afb7f121feed0aa913b2a9e578acb72fd184 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Thu, 1 Feb 2024 03:44:48 +0300 Subject: [PATCH] gl: Vectorize GL_TEMP_IMAGE_SLOT expression --- rpcs3/Emu/RSX/GL/glutils/common.h | 2 +- rpcs3/Emu/RSX/GL/glutils/image.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/glutils/common.h b/rpcs3/Emu/RSX/GL/glutils/common.h index dc7a11e761..0de9fe7afd 100644 --- a/rpcs3/Emu/RSX/GL/glutils/common.h +++ b/rpcs3/Emu/RSX/GL/glutils/common.h @@ -6,7 +6,7 @@ #define GL_VERTEX_TEXTURES_START (GL_FRAGMENT_TEXTURES_START + 16) #define GL_STENCIL_MIRRORS_START (GL_VERTEX_TEXTURES_START + 4) #define GL_STREAM_BUFFER_START (GL_STENCIL_MIRRORS_START + 16) -#define GL_TEMP_IMAGE_SLOT 31 +#define GL_TEMP_IMAGE_SLOT(x) (31 - x) #define UBO_SLOT(x) (x + 8) #define SSBO_SLOT(x) (x) diff --git a/rpcs3/Emu/RSX/GL/glutils/image.cpp b/rpcs3/Emu/RSX/GL/glutils/image.cpp index bf9ef4b0ad..31de23c7a5 100644 --- a/rpcs3/Emu/RSX/GL/glutils/image.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/image.cpp @@ -24,7 +24,7 @@ namespace gl glGenTextures(1, &m_id); // Must bind to initialize the new texture - gl::get_command_context()->bind_texture(GL_TEMP_IMAGE_SLOT, target, m_id, GL_TRUE); + gl::get_command_context()->bind_texture(GL_TEMP_IMAGE_SLOT(0), target, m_id, GL_TRUE); const GLenum storage_fmt = sizedfmt_to_ifmt(sized_format); switch (target)