1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 12:42:41 +01:00

gl: Use DSA for imageview configuration and avoid needless bind operations

This commit is contained in:
kd-11 2022-07-17 15:54:42 +03:00 committed by kd-11
parent e12d268662
commit e95084f138
3 changed files with 8 additions and 5 deletions

View File

@ -199,6 +199,11 @@ OPENGL_PROC(PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC, CompressedTextureSubImage2D
OPENGL_PROC(PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC, CompressedTextureSubImage3D);
OPENGL_PROC(PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC, CompressedTextureSubImage3DEXT);
OPENGL_PROC(PFNGLTEXTUREPARAMETERIPROC, TextureParameteri);
OPENGL_PROC(PFNGLTEXTUREPARAMETERIEXTPROC, TextureParameteriEXT);
OPENGL_PROC(PFNGLTEXTUREPARAMETERIVPROC, TextureParameteriv);
OPENGL_PROC(PFNGLTEXTUREPARAMETERIVEXTPROC, TextureParameterivEXT);
OPENGL_PROC(PFNGLCLEARBUFFERFVPROC, ClearBufferfv);
OPENGL_PROC(PFNGLCOPYNAMEDBUFFERSUBDATAPROC, CopyNamedBufferSubData);

View File

@ -420,7 +420,7 @@ namespace gl
gl::texture_view* get_raw_view()
{
return vram_texture->get_view(0xAAE4, rsx::default_remap_vector);
return vram_texture->get_view(GL_REMAP_IDENTITY, rsx::default_remap_vector);
}
bool is_depth_texture() const

View File

@ -252,8 +252,7 @@ namespace gl
component_swizzle[2] = argb_swizzle[3];
component_swizzle[3] = argb_swizzle[0];
gl::get_command_context()->bind_texture(GL_TEMP_IMAGE_SLOT, m_target, m_id, GL_TRUE);
glTexParameteriv(m_target, GL_TEXTURE_SWIZZLE_RGBA, reinterpret_cast<GLint*>(component_swizzle));
DSA_CALL(TextureParameteriv, m_id, m_target, GL_TEXTURE_SWIZZLE_RGBA, reinterpret_cast<GLint*>(component_swizzle));
}
else
{
@ -268,8 +267,7 @@ namespace gl
constexpr u32 depth_stencil_mask = (image_aspect::depth | image_aspect::stencil);
ensure((range.aspect_mask & depth_stencil_mask) != depth_stencil_mask); // "Invalid aspect mask combination"
gl::get_command_context()->bind_texture(GL_TEMP_IMAGE_SLOT, m_target, m_id, GL_TRUE);
glTexParameteri(m_target, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_STENCIL_INDEX);
DSA_CALL(TextureParameteri, m_id, m_target, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_STENCIL_INDEX);
}
}