From b0ca330e149b5f1609980a8167faa0c363066fd2 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 26 Mar 2018 21:54:16 -0500 Subject: GL: Set up the textures used for each draw call. Each Maxwell shader stage can have an arbitrary number of textures, but we're limited to a certain number in OpenGL. We try to only use the minimum amount of host textures by not keeping a 1:1 relation between guest texture ids and host texture ids, ie, guest texture id 8 can be host texture id 0 if it's the only texture used in the guest shader program. This mapping will have to be passed to the shader decompiler so it can rewrite the texture accesses. --- src/video_core/renderer_opengl/gl_rasterizer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h') diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index ba2113921..d868bf421 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -110,6 +110,9 @@ private: void BindFramebufferSurfaces(const Surface& color_surface, const Surface& depth_surface, bool has_stencil); + /// Binds the required textures to OpenGL before drawing a batch. + void BindTextures(); + /// Syncs the viewport to match the guest state void SyncViewport(const MathUtil::Rectangle& surfaces_rect, u16 res_scale); -- cgit v1.2.3