diff options
| author | 2018-06-26 22:05:03 -0400 | |
|---|---|---|
| committer | 2018-06-26 22:05:03 -0400 | |
| commit | 73de9bab1a55b4953de1b8ce37ed22cac5f10ef5 (patch) | |
| tree | 92702409b4d2af8a77044894e3042f023ea4021b /src | |
| parent | Merge pull request #591 from bunnei/fix-rgb565 (diff) | |
| parent | gl_state: Remove unused state management from 3DS. (diff) | |
| download | yuzu-73de9bab1a55b4953de1b8ce37ed22cac5f10ef5.tar.gz yuzu-73de9bab1a55b4953de1b8ce37ed22cac5f10ef5.tar.xz yuzu-73de9bab1a55b4953de1b8ce37ed22cac5f10ef5.zip | |
Merge pull request #592 from bunnei/cleanup-gl-state
gl_state: Remove unused state management from 3DS.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 66 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 28 |
2 files changed, 0 insertions, 94 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 6e5f9a789..dd5e8de26 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp | |||
| @@ -56,16 +56,6 @@ OpenGLState::OpenGLState() { | |||
| 56 | texture_unit.swizzle.a = GL_ALPHA; | 56 | texture_unit.swizzle.a = GL_ALPHA; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | lighting_lut.texture_buffer = 0; | ||
| 60 | |||
| 61 | fog_lut.texture_buffer = 0; | ||
| 62 | |||
| 63 | proctex_lut.texture_buffer = 0; | ||
| 64 | proctex_diff_lut.texture_buffer = 0; | ||
| 65 | proctex_color_map.texture_buffer = 0; | ||
| 66 | proctex_alpha_map.texture_buffer = 0; | ||
| 67 | proctex_noise_lut.texture_buffer = 0; | ||
| 68 | |||
| 69 | draw.read_framebuffer = 0; | 59 | draw.read_framebuffer = 0; |
| 70 | draw.draw_framebuffer = 0; | 60 | draw.draw_framebuffer = 0; |
| 71 | draw.vertex_array = 0; | 61 | draw.vertex_array = 0; |
| @@ -229,48 +219,6 @@ void OpenGLState::Apply() const { | |||
| 229 | } | 219 | } |
| 230 | } | 220 | } |
| 231 | 221 | ||
| 232 | // Lighting LUTs | ||
| 233 | if (lighting_lut.texture_buffer != cur_state.lighting_lut.texture_buffer) { | ||
| 234 | glActiveTexture(TextureUnits::LightingLUT.Enum()); | ||
| 235 | glBindTexture(GL_TEXTURE_BUFFER, lighting_lut.texture_buffer); | ||
| 236 | } | ||
| 237 | |||
| 238 | // Fog LUT | ||
| 239 | if (fog_lut.texture_buffer != cur_state.fog_lut.texture_buffer) { | ||
| 240 | glActiveTexture(TextureUnits::FogLUT.Enum()); | ||
| 241 | glBindTexture(GL_TEXTURE_BUFFER, fog_lut.texture_buffer); | ||
| 242 | } | ||
| 243 | |||
| 244 | // ProcTex Noise LUT | ||
| 245 | if (proctex_noise_lut.texture_buffer != cur_state.proctex_noise_lut.texture_buffer) { | ||
| 246 | glActiveTexture(TextureUnits::ProcTexNoiseLUT.Enum()); | ||
| 247 | glBindTexture(GL_TEXTURE_BUFFER, proctex_noise_lut.texture_buffer); | ||
| 248 | } | ||
| 249 | |||
| 250 | // ProcTex Color Map | ||
| 251 | if (proctex_color_map.texture_buffer != cur_state.proctex_color_map.texture_buffer) { | ||
| 252 | glActiveTexture(TextureUnits::ProcTexColorMap.Enum()); | ||
| 253 | glBindTexture(GL_TEXTURE_BUFFER, proctex_color_map.texture_buffer); | ||
| 254 | } | ||
| 255 | |||
| 256 | // ProcTex Alpha Map | ||
| 257 | if (proctex_alpha_map.texture_buffer != cur_state.proctex_alpha_map.texture_buffer) { | ||
| 258 | glActiveTexture(TextureUnits::ProcTexAlphaMap.Enum()); | ||
| 259 | glBindTexture(GL_TEXTURE_BUFFER, proctex_alpha_map.texture_buffer); | ||
| 260 | } | ||
| 261 | |||
| 262 | // ProcTex LUT | ||
| 263 | if (proctex_lut.texture_buffer != cur_state.proctex_lut.texture_buffer) { | ||
| 264 | glActiveTexture(TextureUnits::ProcTexLUT.Enum()); | ||
| 265 | glBindTexture(GL_TEXTURE_BUFFER, proctex_lut.texture_buffer); | ||
| 266 | } | ||
| 267 | |||
| 268 | // ProcTex Diff LUT | ||
| 269 | if (proctex_diff_lut.texture_buffer != cur_state.proctex_diff_lut.texture_buffer) { | ||
| 270 | glActiveTexture(TextureUnits::ProcTexDiffLUT.Enum()); | ||
| 271 | glBindTexture(GL_TEXTURE_BUFFER, proctex_diff_lut.texture_buffer); | ||
| 272 | } | ||
| 273 | |||
| 274 | // Framebuffer | 222 | // Framebuffer |
| 275 | if (draw.read_framebuffer != cur_state.draw.read_framebuffer) { | 223 | if (draw.read_framebuffer != cur_state.draw.read_framebuffer) { |
| 276 | glBindFramebuffer(GL_READ_FRAMEBUFFER, draw.read_framebuffer); | 224 | glBindFramebuffer(GL_READ_FRAMEBUFFER, draw.read_framebuffer); |
| @@ -344,20 +292,6 @@ OpenGLState& OpenGLState::ResetTexture(GLuint handle) { | |||
| 344 | unit.texture_2d = 0; | 292 | unit.texture_2d = 0; |
| 345 | } | 293 | } |
| 346 | } | 294 | } |
| 347 | if (lighting_lut.texture_buffer == handle) | ||
| 348 | lighting_lut.texture_buffer = 0; | ||
| 349 | if (fog_lut.texture_buffer == handle) | ||
| 350 | fog_lut.texture_buffer = 0; | ||
| 351 | if (proctex_noise_lut.texture_buffer == handle) | ||
| 352 | proctex_noise_lut.texture_buffer = 0; | ||
| 353 | if (proctex_color_map.texture_buffer == handle) | ||
| 354 | proctex_color_map.texture_buffer = 0; | ||
| 355 | if (proctex_alpha_map.texture_buffer == handle) | ||
| 356 | proctex_alpha_map.texture_buffer = 0; | ||
| 357 | if (proctex_lut.texture_buffer == handle) | ||
| 358 | proctex_lut.texture_buffer = 0; | ||
| 359 | if (proctex_diff_lut.texture_buffer == handle) | ||
| 360 | proctex_diff_lut.texture_buffer = 0; | ||
| 361 | return *this; | 295 | return *this; |
| 362 | } | 296 | } |
| 363 | 297 | ||
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 839e50e93..844144215 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h | |||
| @@ -94,34 +94,6 @@ public: | |||
| 94 | } texture_units[32]; | 94 | } texture_units[32]; |
| 95 | 95 | ||
| 96 | struct { | 96 | struct { |
| 97 | GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER | ||
| 98 | } lighting_lut; | ||
| 99 | |||
| 100 | struct { | ||
| 101 | GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER | ||
| 102 | } fog_lut; | ||
| 103 | |||
| 104 | struct { | ||
| 105 | GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER | ||
| 106 | } proctex_noise_lut; | ||
| 107 | |||
| 108 | struct { | ||
| 109 | GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER | ||
| 110 | } proctex_color_map; | ||
| 111 | |||
| 112 | struct { | ||
| 113 | GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER | ||
| 114 | } proctex_alpha_map; | ||
| 115 | |||
| 116 | struct { | ||
| 117 | GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER | ||
| 118 | } proctex_lut; | ||
| 119 | |||
| 120 | struct { | ||
| 121 | GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER | ||
| 122 | } proctex_diff_lut; | ||
| 123 | |||
| 124 | struct { | ||
| 125 | GLuint read_framebuffer; // GL_READ_FRAMEBUFFER_BINDING | 97 | GLuint read_framebuffer; // GL_READ_FRAMEBUFFER_BINDING |
| 126 | GLuint draw_framebuffer; // GL_DRAW_FRAMEBUFFER_BINDING | 98 | GLuint draw_framebuffer; // GL_DRAW_FRAMEBUFFER_BINDING |
| 127 | GLuint vertex_array; // GL_VERTEX_ARRAY_BINDING | 99 | GLuint vertex_array; // GL_VERTEX_ARRAY_BINDING |