summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-02-12renderer_opengl: Support framebuffer flip vertical.bunnei2-5/+12
2018-01-27memory: Replace all memory hooking with Special regionsMerryMage1-1/+1
2018-01-21Format: Run the new clang format on everythingJames Rowe1-1/+1
2018-01-16clang-formatMerryMage1-1/+2
2018-01-15renderer_gl: Clear screen to black before rendering framebuffer.bunnei2-5/+8
2018-01-15renderer: Render previous frame when no new one is available.bunnei2-15/+16
2018-01-13Fix build on macOS and linuxMerryMage1-0/+1
2018-01-13Remove references to PICA and rasterizers in video_coreJames Rowe9-4676/+0
2018-01-12renderer_opengl: Fix LOG_TRACE in LoadFBToScreenInfo.bunnei1-1/+1
2018-01-11renderer_opengl: Support rendering Switch framebuffer.bunnei2-136/+78
2018-01-11renderer_opengl: Add MortonCopyPixels function for Switch framebuffer.bunnei1-0/+111
2018-01-11renderer_opengl: Update DrawScreens for Switch.bunnei2-23/+11
2018-01-01core/video_core: Fix a bunch of u64 -> u32 warnings.bunnei2-4/+4
2017-09-30Fixed type conversion ambiguityHuw Pascoe1-2/+2
2017-09-17Fixed framebuffer warningHuw Pascoe1-7/+18
2017-09-03pica/lighting: only apply Fresnel factor for the last lightwwylele1-4/+5
2017-08-31video_core: report telemetry for gas modewwylele1-0/+6
2017-08-25gl_rasterizer: implement custom clip planewwylele3-34/+83
2017-08-22gl_rasterizer/lighting: more accurate CP formulawwylele1-2/+2
2017-08-21gl_shader_gen: simplify and clarify the depth transformation between vertex shader and fragment shaderwwylele1-2/+5
2017-08-21gl_rasterizer: add clipping plane z<=0 defined in PICAwwylele4-0/+21
2017-08-11gl_shader_gen: don't call SampleTexture when bump map is not usedwwylele1-4/+5
2017-07-18telemetry: Log performance, configuration, and system data.bunnei2-6/+16
2017-07-01gl_rasterizer: use texture buffer for proctex LUTwwylele5-70/+80
2017-06-22gl_rasterizer: use texture buffer for fog LUTwwylele5-27/+23
2017-06-22gl_rasterizer: create the texture before applying the statewwylele1-2/+2
this is a rebasing error from #2792. It doesn't affect much though, because the later more Apply() call fixes/hides it
2017-06-21gl_state: reset 1d textureswwylele1-0/+14
2017-06-21gl_rasterizer: fix glGetUniformLocation typewwylele1-8/+8
2017-06-21gl_rasterizer: manage texture ids in one placewwylele3-31/+55
2017-06-21gl_rasterizer/lighting: fix LUT interpolationwwylele5-113/+91
2017-06-18gl_rasterizer/lighting: use the formula from the paper for germetic factorwwylele1-8/+8
2017-06-15gl_rasterizer/lighting: implement geometric factorwwylele2-1/+18
2017-06-11gl_rasterizer/lighting: Implement tangent mappingwwylele1-7/+12
2017-06-11gl_rasterizer/lighting: implement lut input 5 (CP)wwylele1-2/+25
2017-06-10gl_rasterizer_cache: depth write is disabled if allow_depth_stencil_write is falsewwylele1-4/+5
2017-06-10OpenGL: Update comment on AreQuaternionsOpposite with new informationYuri Kunde Schlesner1-8/+11
While debugging the software renderer implementation, it was noticed that this is actually exactly what the hardware does, upgrading the status of this "hack" to being a proper implementation. And there was much rejoicing.
2017-06-04pica/rasterizer: implement/stub texture wrap mode 4-7wwylele1-0/+13
2017-05-30gl_rasterizer: implement spot lightwwylele1-6/+24
2017-05-30gl_rasterizer: sync spot light statuswwylele4-2/+61
2017-05-28Move screen size constants from video_core to coreYuri Kunde Schlesner1-12/+8
video_core didn't even properly use them, and they were the source of many otherwise-unnecessary dependencies from core to video_core.
2017-05-28OpenGL: Remove unused RendererOpenGL fieldsYuri Kunde Schlesner2-11/+2
2017-05-27OpenGL: Improve accuracy of quaternion interpolationYuri Kunde Schlesner1-3/+5
Current order of operations (rotate then normalize) seems to produce a lot more distortion than normalizing and then rotating. This makes Citra results match pretty closesly with hardware, and indicates that hardware may also be using lerp instead of slerp to interpolate the quaternions.
2017-05-27gl_shader: refactor texture sampler into its own functionwwylele1-40/+39
2017-05-20gl_rasterizer: implement procedural texturewwylele6-7/+600
2017-05-05pica: shader_dirty if texture2 coord changedwwylele2-1/+5
2017-05-03pica: use correct coordinates for texture 2wwylele2-3/+15
2017-04-20gl_shader_gen: remove TODO about Lerp behaviour verification. The implementation is verified against hardwarewwylele1-2/+0
2017-04-19rasterizer: implement combiner operation 7 (Dot3_RGBA)wwylele1-11/+20
2017-04-17OpenGL: Pass Pica regs via parameterYuri Kunde Schlesner3-7/+5
2017-04-17OpenGL: Move PicaShaderConfig to gl_shader_gen.hYuri Kunde Schlesner4-202/+206
Also move the implementation of CurrentConfig to the cpp file.
2017-04-17OpenGL: Move Attributes enum to a more appropriate fileYuri Kunde Schlesner3-12/+11
2017-03-01Input: remove unused stuff & clean upwwylele1-0/+1
1. removed zl, zr and c-stick from HID::PadState. They are handled by IR, not HID 2. removed button handling in EmuWindow 3. removed key_map 4. cleanup #include
2017-02-27Core: Re-write frame limiterYuri Kunde Schlesner1-3/+3
Now based on std::chrono, and also works in terms of emulated time instead of frames, so we can in the future frame-limit even when the display is disabled, etc. The frame limiter can also be enabled along with v-sync now, which should be useful for those with displays running at more than 60 Hz.
2017-02-27Core: Make PerfStats internally lockedYuri Kunde Schlesner1-8/+2
More ergonomic to use and will be required for upcoming changes.
2017-02-27Remove built-in (non-Microprofile) profilerYuri Kunde Schlesner1-8/+0
2017-02-27Add performance statistics to status barYuri Kunde Schlesner1-0/+9
2017-02-18OpenGL: Check if uniform block exists before updating it (#2581)Jannik Vogel1-29/+30
2017-02-09OpenGL: Remove unused duplicate of IsPassThroughTevStageYuri Kunde Schlesner1-12/+0
This copy was left behind when the shader generation code was moved to a separate file.
2017-02-09VideoCore: Split regs.h inclusionsYuri Kunde Schlesner5-17/+29
2017-02-04VideoCore: Move Regs to its own fileYuri Kunde Schlesner5-5/+5
2017-02-04VideoCore: Split lighting regs from Regs structYuri Kunde Schlesner3-37/+45
2017-02-04VideoCore: Split framebuffer regs from Regs structYuri Kunde Schlesner6-70/+84
2017-02-04VideoCore: Split texturing regs from Regs structYuri Kunde Schlesner6-85/+91
2017-02-04VideoCore: Split rasterizer regs from Regs structYuri Kunde Schlesner3-32/+37
2017-02-04Pica/Texture: Simplify/cleanup texture tile addressingYuri Kunde Schlesner1-2/+1
2017-02-04VideoCore: Move LookupTexture out of debug_utils.hYuri Kunde Schlesner1-5/+6
2017-01-30VideoCore: Change misleading register namesYuri Kunde Schlesner2-2/+2
A few registers had names such as "count" or "number" when they actually contained the maximum (that is, count - 1). This can easily lead to hard to notice off by one errors.
2017-01-30video_core: gl_rasterizer_cache.cpp removed unused type aliasKloen1-1/+0
2017-01-30video_core: gl_rasterizer.cpp removed unused type aliasKloen1-2/+0
2017-01-29video_core: silence unused-local-typedef boost related warning on GCCKloen1-0/+7
2017-01-23video_core: gl_rasterizer float to int warningKloen1-1/+2
2017-01-23video_core: fix gl_rasterizer warning on MSVCKloen1-1/+1
2017-01-07config: Add option for specifying screen resolution scale factor.bunnei1-3/+10
2016-12-25Minor cleanup in GLSL codeJannik Vogel1-3/+2
2016-12-25Offset lighting LUT samples correctlyJannik Vogel1-7/+7
2016-12-23core: Move emu_window and key_map into coreMerryMage2-2/+2
* Removes circular dependences (common should not depend on core)
2016-12-19Use GL_TRUE when setting color_maskAlbin Bernhardsson1-4/+4
2016-12-15VideoCore: Make profiling scope more representativeYuri Kunde Schlesner1-0/+12
2016-12-07OpenGL: Drop framebuffer completeness check.Markus Wick5-47/+8
This OpenGL call synchronize the worker thread of the nvidia blob. It can be verified on linux with the __GL_THREADED_OPTIMIZATIONS=1 environment variable. Those errors should not happen on tested drivers. It was used as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=94148
2016-12-05ASSERT that shader was linked successfullyJannik Vogel1-0/+2
2016-12-05Report shader uniform block size in case of mismatchJannik Vogel1-1/+3
2016-12-05Print broken shader code to logJannik Vogel1-3/+9
2016-12-04OpenGL: Non-zero stride only makes sense for linear buffersYuri Kunde Schlesner3-7/+11
2016-12-04OpenGL: Ensure framebuffer binding is restored if completion check failsYuri Kunde Schlesner1-10/+7
2016-12-04OpenGL: Fix DisplayTransfer accel when input width != output widthYuri Kunde Schlesner1-1/+10
Fixes #2246, #2261
2016-11-30ClangFormat: Fixed the clang-format errorsSubv1-4/+8
2016-11-29Build: Fixed a few warnings.Subv1-4/+4
2016-11-27RasterizerGL: Use GL_TRUE and 0xFF in the stencil and depth masks instead of simply true and -1Subv2-4/+4
2016-11-27Rasterizer/Memfill: Set the correct stencil write mask when clearing the stencil buffer.Subv1-1/+1
2016-11-05Add default hotkey to swap primary screens.James Rowe1-3/+2
Also minor style changes
2016-11-05Support additional screen layouts.James Rowe1-6/+12
Allows users to choose a single screen layout or a large screen layout. Adds a configuration option to change the prominent screen.
2016-09-30OpenGL: Take cached viewport sub-rect into account for scissorYuri Kunde Schlesner3-29/+25
Fixes #1938
2016-09-29rasterizer: separate TextureCopy from DisplayTransferwwylele2-5/+6
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner6-6/+6
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot11-42/+6
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner8-46/+40
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot12-486/+789
2016-08-30OpenGL: Avoid error on unsupported lighting LUTJannik Vogel1-0/+1
2016-06-28OpenGL: Add scaled resolution support to scissorYuri Kunde Schlesner4-3/+16
2016-06-28PICA: Scissor fixes and cleanupsYuri Kunde Schlesner3-21/+22
2016-06-28PICA: Implement scissor testSubv3-1/+53
2016-06-07OpenGL: Implement fogJannik Vogel5-7/+124
2016-06-07OpenGL: Avoid undefined behaviour for UNIFORM_BLOCK_DATA_SIZEJannik Vogel2-6/+8
2016-06-01gsp::gpu: Reset g_thread_id in UnregisterInterruptRelayQueuemailwl1-1/+1
2016-05-23OpenGL: Set shader_dirty on lighting changesJannik Vogel1-0/+23
2016-05-23Pica: Name LightSrc.config registerJannik Vogel1-2/+2
2016-05-23Pica: Name lighting.config0 and .config1 registersJannik Vogel1-12/+12
2016-05-23OpenGL: Use uniforms for dist_atten_bias and dist_atten_scaleJannik Vogel3-8/+84
2016-05-14OpenGL: Only update depth uniforms if the depth changedJannik Vogel2-9/+22
2016-05-14OpenGL: value-initialize variables which cause uninitialised access otherwiseJannik Vogel1-2/+2
2016-05-12OpenGL: Support blend equationJannik Vogel4-0/+31
2016-05-11OpenGL: Implement texture type 3Jannik Vogel4-35/+67
2016-05-10gl_rasterizer: Fix compilation for debug buildsLioncash1-1/+1
2016-05-10OpenGL: Implement W-Buffers and fix depth-mappingJannik Vogel3-4/+23
2016-05-10Pica: Implement W-Buffer in SW rasterizerJannik Vogel1-2/+2
2016-05-07fixup simple type conversions where possibleAlexander Laties2-2/+2
2016-05-06Frontends, VideoCore: Move glad initialisation to the frontendEmmanuel Gil Peyrot1-6/+0
On SDL2 this allows it to use SDL_GL_GetProcAddress() instead of the default function loader, and fixes a crash when using apitrace with an EGL context. On Qt we will need to migrate from QGLWidget to QOpenGLWidget and QOpenGLContext before we can use gladLoadGLLoader() instead of gladLoadGL(), since the former doesn’t expose a function loader.
2016-05-03Pica: Use a union for PicaShaderConfigJannik Vogel3-125/+139
2016-05-03Pica: Add TevStageConfigRaw to PicaShaderConfig (MSVC workaround)Jannik Vogel2-2/+23
2016-05-03Pica: Make PicaShaderConfig trivially_copyable and clear it before useJannik Vogel1-21/+28
2016-05-03OpenGL: Don't copy const_color (Reverts #1745)Jannik Vogel1-2/+3
2016-05-01OpenGL: Copy TevStageConfig using a loop. Fixes bug: const_color not copiedJannik Vogel1-30/+11
2016-04-30OpenGL: border_color was never set. Fixed. (#1740)Jannik Vogel1-0/+1
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot12-24/+76
2016-04-29Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner1-1/+0
This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI.
2016-04-22HWRasterizer: reorder declarations to match defstfarley1-9/+9
2016-04-22HWRasterizer: sync specular uniform for new shaderstfarley1-0/+2
2016-04-21HWRasterizer: Texture forwardingtfarley8-738/+1347
2016-04-10OpenGL: Implement color combiner Operation::Dot3_RGBJannik Vogel1-0/+3
2016-04-08OpenGL: Respect buffer-write allow registersJannik Vogel1-6/+28
2016-04-08OpenGL: Split buffer-write mask sync into seperate functionsJannik Vogel2-8/+39
2016-04-08OpenGL: Keep stencil-test and framebuffer.depth_format in syncJannik Vogel1-0/+1
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage2-4/+4
2016-04-03OpenGL: Fix a double framebuffer completeness checks.Emmanuel Gil Peyrot1-4/+6
2016-04-03OpenGL: Check for framebuffer completenessJannik Vogel1-0/+3
2016-04-01Avoid warnings by casting to size_t for ARRAY_SIZE() comparisonsJannik Vogel1-6/+6
2016-03-24OpenGL: Don't attempt to draw empty triangle batchesYuri Kunde Schlesner1-0/+3
Our code did not handle this well, causing random crashes in some situations.
2016-03-08Improve error report from Init() functionsLittleWhite2-2/+8
Add error popup when citra initialization failed
2016-03-06Pica: Write depth value even when depth test is disabledYuri Kunde Schlesner1-2/+4
This has been confirmed on hardware. Fixes Etrian Odyssey IV.
2016-03-03Add immediate mode vertex submissionDwayne Slater2-0/+2
2016-02-26renderer_opengl: Initalise fragment shader LUT texturesMerryMage1-0/+4
2016-02-05pica: Cleanup lighting register definitions and documentation.bunnei1-15/+15
2016-02-05gl_rasterizer: Use alignas(16) instead of explicit padding.bunnei1-13/+6
2016-02-05renderer_opengl: Use GLvec3/GLvec4 aliases for commonly used types.bunnei4-14/+18
2016-02-05gl_rasterizer: Fix issue with interpolation of opposite quaternions.bunnei2-4/+32
2016-02-05pica_types: Replace float24/20/16 with a template class.bunnei2-9/+9
2016-02-05gl_rasterizer: Remove unnecessary casts.bunnei1-6/+6
2016-02-05gl_rasterizer: Fix PicaShaderConfig on GCC.bunnei1-29/+27
2016-02-05gl_rasterizer: Initial implementation of bump mapping.bunnei2-5/+33
2016-02-05gl_shader_gen: Fix bug in LUT range (should within range [0, 255] not [0, 256]).bunnei1-3/+3
2016-02-05gl_shader_gen: Implement lighting red, green, and blue reflection.bunnei2-18/+62
2016-02-05gl_shader_gen: View should be normalized.bunnei1-2/+2
2016-02-05gl_shader_gen: Implement fragment lighting fresnel effect.bunnei2-9/+33
2016-02-05gl_shader_gen: Implement fragment lighting specular 1 component.bunnei2-3/+22
2016-02-05gl_shader_gen: Add support for D0 LUT scaling.bunnei2-2/+4
2016-02-05gl_shader_gen: Refactor lighting config to match Pica register naming.bunnei2-42/+48
- Also implement D0 LUT enable.
2016-02-05pica: Cleanup and add some comments to lighting registers.bunnei1-1/+1
2016-02-05gl_rasterizer: Minor naming refactor on Pica register naming.bunnei1-5/+5
2016-02-05gl_shader_gen: Reorganize and cleanup lighting code.bunnei1-100/+107
- No functional difference.
2016-02-05gl_shader_gen: Fix directional lights.bunnei1-1/+1
2016-02-05gl_shader_gen: Fix bug with lighting where clamp highlights was only applied to last light.bunnei1-6/+6
2016-02-05gl_shader_gen: View vector needs to be normalized when computing half angle vector.bunnei1-3/+4
2016-02-05renderer_opengl: Use textures for fragment shader LUTs instead of UBOs.bunnei5-27/+64
- Gets us LUT interpolation for free. - Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
2016-02-05renderer_opengl: Initial implementation of basic specular lighting.bunnei3-12/+158
2016-02-05renderer_opengl: Implement HW fragment lighting distance attenuation.bunnei2-17/+38
2016-02-05renderer_opengl: Implement HW fragment lighting LUTs within our default UBO.bunnei3-15/+66
2016-02-05renderer_opengl: Implement diffuse component of HW fragment lighting.bunnei5-5/+259
2016-02-03hwrasterizer: Use proper cached fb addr/sizetfarley2-42/+34
2016-02-03OpenGL: Downgrade GL_DEBUG_SEVERITY_NOTIFICATION to Debug logging levelYuri Kunde Schlesner1-2/+0
The nVidia driver is *extremely* spammy on this category, sending a message on every buffer or texture upload, slowing down the emulator and making the log useless.
2016-01-21hwrasterizer: Use depth offsettfarley3-2/+24
2015-12-08VideoCore: Unify interface to OpenGL and SW rasterizersYuri Kunde Schlesner3-38/+5
This removes explicit checks sprinkled all over the codebase to instead just have the SW rasterizer expose an implementation with no-ops for most operations.
2015-12-07VideoCore: Rename HWRasterizer methods to be less confusingYuri Kunde Schlesner2-6/+6
2015-12-07OpenGL: Rename cache functions to better match what they actually doYuri Kunde Schlesner3-12/+11
2015-12-05OpenGL: Flip framebuffers during transfer rather than when renderingYuri Kunde Schlesner2-12/+11
2015-12-05OpenGL: Add support for glFrontFace in the state trackerYuri Kunde Schlesner2-0/+6
2015-12-01PICA: Properly emulate 1-stage delay in the combiner bufferYuri Kunde Schlesner1-7/+11
This was discovered and verified by @fincs. The tev combiner buffer actually lags behind by one stage, meaning stage 1 reads the initial color, stage 2 reads stage 0's output, and so on. Fixes character portraits in Fire Emblem: Awakening and world textures in Zelda: ALBW. Closes #1140.
2015-11-26renderer_opengl: Fix uniform issues introduced with kemenaran/avoid-explicit-uniform-location.bunnei2-6/+8
2015-11-25Use regular uniform locationPierre de La Morinerie3-15/+5
The support for GL_ARB_explicit_uniform_location is not that good (53% according to http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_explicit_uniform_location). This fix the shader compilation on Intel HD 4000 (#1222).
2015-11-19FragShader: Use an UBO instead of several individual uniformsSubv6-13/+67
2015-10-24OpenGL: Log GL_KHR_debug messages we receiveEmmanuel Gil Peyrot1-0/+57
This allows the driver to communicate errors, warnings and improvement suggestions about our usage of the API.
2015-10-22gl_shader_gen: Use explicit locations for vertex shader attributes.bunnei2-15/+9
2015-10-22gl_shader_gen: Optimize code for AppendAlphaTestCondition.bunnei1-16/+11
- Also add a comment to AppendColorCombiner.
2015-10-22gl_rasterizer: Define enum types for each vertex texcoord attribute.bunnei3-12/+14
2015-10-22gl_shader_gen: Various cleanups to shader generation.bunnei3-48/+52
2015-10-22gl_rasterizer: Use MMH3 hash for shader cache hey.bunnei4-83/+63
- Includes a check to confirm no hash collisions.
2015-10-22gl_shader_gen: Require explicit uniform locations.bunnei3-56/+34
- Fixes uniform issue on AMD.
2015-10-22gl_shader_gen: Rename 'o' to 'attr' in vertex/fragment shaders.bunnei1-11/+11
2015-10-22gl_shader_gen: AppendAlphaModifier default should be 0.0, not vec4(0.0).bunnei1-1/+1
2015-10-22gl_shader_gen: Fix bug where TEV stage outputs should be clamped.bunnei1-3/+3
2015-10-22gl_rasterizer: Add documentation to ShaderCacheKey.bunnei1-0/+16
2015-10-22gl_shader_gen: Add additional function documentation.bunnei2-0/+18
2015-10-22gl_shader_util: Cleanup header file + add docstring.bunnei1-1/+7
2015-10-22gl_shader_gen: Various cleanups + moved TEV stage generation to its own function.bunnei1-161/+170
2015-10-22renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups.bunnei9-787/+507
2015-10-22gl_rasterizer: Move logic for creating ShaderCacheKey to a static function.bunnei2-18/+46
2015-10-22gl_shader_util: Use vec3 constants for AppendColorCombiner.bunnei1-6/+6
2015-10-22gl_rasterizer: Fix typo in uploading TEV const color uniforms.bunnei1-5/+5
2015-10-22gl_shader_util: Fix precision bug with alpha testing.bunnei2-9/+9
- Alpha testing is not done with float32 precision, this makes the HW renderer match the SW renderer.
2015-10-22Initial implementation of fragment shader generation with caching.Subv6-261/+564
2015-10-07Silence -Wsign-compare warnings.Rohit Nirmal1-3/+3
2015-09-29fix some xcode 7.0 warningsMartin Lindhe1-1/+0
2015-09-16general: Silence some warnings when using clangLioncash1-2/+2
2015-09-11video_core: Reorganize headersLioncash7-18/+17
2015-09-11video_core: Remove unnecessary includes from headersLioncash2-6/+3
2015-09-10renderer_opengl: Remove unimplemented function declarationLioncash1-3/+0
2015-09-10gl_rasterizer: Replace push_back calls with emplace_back in AddTriangleLioncash1-3/+3
2015-09-03OpenGL: Use Sampler Objects to decouple sampler config from texturesYuri Kunde Schlesner4-21/+76
Fixes #978
2015-09-03OpenGL: Remove ugly and endian-unsafe color pointer castsYuri Kunde Schlesner3-9/+9
2015-09-03OpenGL: Add support for Sampler Objects to state trackerYuri Kunde Schlesner3-4/+42
2015-08-30Replace the previous OpenGL loader with a glad-generated 3.3 oneYuri Kunde Schlesner10-2810/+11
The main advantage of switching to glad from glLoadGen is that, apart from being actively maintained, it supports a customizable entrypoint loader function, which makes it possible to also support OpenGL ES.
2015-08-28gl_rasterizer_cache: Detect and ignore unnecessary texture flushes.bunnei3-8/+18
2015-08-25Integrate the MicroProfile profiling libraryYuri Kunde Schlesner2-0/+15
This brings goodies such as a configurable user interface and multi-threaded timeline view.
2015-08-24HWRenderer: Added a workaround for the Intel Windows driver bug that causes glTexSubImage2D to not change the stencil buffer.Subv1-2/+9
Reported here https://communities.intel.com/message/324464
2015-08-21HWRasterizer: Implemented stencil ops 6 and 7.Subv1-1/+3
2015-08-21HWRasterizer: Implemented stencil op 1 (GL_ZERO)Subv1-1/+1
2015-08-20GLRasterizer: Implemented stencil testing in the hw renderer.Subv4-2/+44
2015-08-15Shader: Move shader code to its own subdirectory, "shader".bunnei1-1/+1
2015-08-15GPU: Refactor "VertexShader" namespace to "Shader".bunnei2-8/+8
- Also renames "vertex_shader.*" to "shader_interpreter.*"
2015-08-06OpenGL: Fix state tracking in situations with reused object handlesYuri Kunde Schlesner4-0/+45
If an OpenGL object is created, bound to a binding using the state tracker, and then destroyed, a newly created object can be assigned the same numeric handle by OpenGL. However, even though it is a new object, and thus needs to be bound to the binding again, the state tracker compared the current and previous handles and concluded that no change needed to be made, leading to failure to bind objects in certain cases. This manifested as broken text in VVVVVV, which this commit fixes along with similar texturing problems in other games.
2015-08-06OpenGL: Remove redundant texture.enable_2d field from OpenGLStateYuri Kunde Schlesner4-26/+3
All uses of this field where it's false can just set the texture id to 0 instead.
2015-07-28OpenGL: Add a profiler category measuring framebuffer readbackYuri Kunde Schlesner1-0/+7
2015-07-26OpenGL: Make OpenGL object resource wrappers fully inlineYuri Kunde Schlesner2-142/+79
The functions are so simple that having them separate only bloats the code and hinders optimization.
2015-07-23Rasterizer/GL: Set the border color when binding a texture.Subv1-2/+9
2015-07-22GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) callsYuri Kunde Schlesner1-8/+5
In OpenGL 3, texturing is always enabled, and this call is invalid. While it produced no effect in the rest of the execution, it wouldn't have the intended effect of disabling texturing for that unit. Instead bind a null texture to the unit.
2015-07-21GPU: Added registers for min and mag texture filters and implemented them in the hw renderer.Subv2-3/+29
2015-07-19GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.Subv1-3/+7
2015-07-13Add CiTrace recording support.Tony Wasserka1-0/+6
This is exposed in the GUI as a new "CiTrace Recording" widget. Playback is implemented by a standalone 3DS homebrew application (which only runs reliably within Citra currently; on an actual 3DS it will often crash still).
2015-07-09Added GL_CLAMP_TO_BORDER supportLectem1-1/+1
2015-06-28Core: Cleanup hw includes.Emmanuel Gil Peyrot2-0/+2
2015-06-28Core, VideoCore: Replace or fix exit() calls.Emmanuel Gil Peyrot1-6/+9
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot2-3/+9
2015-06-16VideoCore: Log the GL driver’s vendor and renderer.Emmanuel Gil Peyrot1-0/+2
2015-06-09Renderer formatting editstfarley2-26/+29
2015-06-09Render-to-texture flush, interval math fixtfarley1-1/+13
2015-06-09Liberal texture unbind (clout menu)tfarley2-4/+40
2015-06-09Depth format fix (crush3d intro/black screens)tfarley1-46/+46
2015-06-09Implemented glColorMasktfarley3-0/+24
2015-05-31Pica: Use zero for the SecondaryFragmentColor source.bunnei1-10/+14
- This is a workaround until we support fragment lighting.
2015-05-31Pica: Implement LogicOp function.bunnei5-0/+57
2015-05-30Move video_core/color.h to common/color.harchshift1-1/+2
2015-05-30Move video_core/math.h to common/vector_math.harchshift1-1/+1
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot5-12/+12
2015-05-23gl_state: Remove unnecessary const specifier on ApplyLioncash2-2/+2
2015-05-23Pica: Create 'State' structure and move state memory there.bunnei2-114/+132
2015-05-23gl_state: Fix a condition typo in ApplyLioncash1-1/+1
2015-05-23OpenGL renderertfarley12-20/+2069
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner1-1/+1
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-09Memory: Add GetPhysicalPointer helper functionYuri Kunde Schlesner1-4/+4
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-0/+1
2015-04-04Allow the user to set the background clear color during emulationarchshift1-1/+2
The background color can be seen at the sides of the bottom screen or when the window is wider than normal.
2015-03-09Added LCD registers, and implementation for color filling in OGL code.archshift2-11/+48
2015-03-07Set framebuffer layout from EmuWindow.bunnei1-39/+9
2015-03-02Add profiling infrastructure and widgetYuri Kunde Schlesner1-0/+12
2015-02-15video_core: Implement the remaining framebuffer formats in the OpenGL renderer.Emmanuel Gil Peyrot2-12/+67
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift2-4/+4
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
2015-01-14GSP: Update framebuffer info on all interruptsYuri Kunde Schlesner1-3/+1
Hardware testing determined that the GSP processes shared memory framebuffer update info even when no memory transfer or filling GX commands are used. They are now updated on every interrupt, which isn't confirmed correct but matches hardware behaviour more closely. This also reverts the hack introduced in #404. It made a few games behave better, but I believe it's incorrect and also breaks other games.
2015-01-08GSP: Toggle active framebuffer each framebunnei1-1/+4
2014-12-21License changepurpasmart965-5/+5
2014-12-20Clean up some warningsChin1-2/+2
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner2-12/+24
2014-12-03Change NULLs to nullptrs.Rohit Nirmal1-5/+5
2014-12-01Silence a few -Wsign-compare warnings.Rohit Nirmal1-1/+1
2014-11-30Fixed viewport error caused by roundingvaguilar1-2/+2
2014-11-19Remove tabs in all files except in skyeye imports and in generated GL codeEmmanuel Gil Peyrot1-1/+1
2014-11-18OpenGL Renderer: Cleanup viewport extent calculation.Tony Wasserka2-44/+29
2014-11-18Fixup EmuWindow interface and implementations thereof.Tony Wasserka1-3/+3
2014-11-18Viewport scaling and display density independenceKevin Hartman2-1/+50
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window. On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
2014-10-26Add `override` keyword through the code.Yuri Kunde Schlesner1-4/+4
This was automated using `clang-modernize`.
2014-10-21Only check OpenGL shader log if size is >1.Yuri Kunde Schlesner1-9/+6
This prevents a crash when the buffer size returned by the driver is 0, in which case no space is allocated to store even the NULL byte and glGetShaderInfoLog errors out. Thanks to @Relys for the bug report.
2014-10-12Rework OpenGL renderer.Yuri Kunde Schlesner3-233/+189
The OpenGL renderer has been revised, with the following changes: - Initialization and rendering have been refactored to reduce the number of redundant objects used. - Framebuffer rotation is now done directly, using texture mapping. - Vertex coordinates are now given in pixels, and the projection matrix isn't hardcoded anymore.
2014-10-12OpenGL renderer: Shuffle initialization code around and rename functions.Yuri Kunde Schlesner2-25/+18
2014-10-12Remove virtual inheritance from RendererOpenGLYuri Kunde Schlesner1-2/+2
Also make destructor virtual so that instances are properly destructed.
2014-09-09Moved common_types::Rect from common to Common namespacearchshift2-3/+3
2014-09-07renderer_opengl.cpp: improved alignment for readabilityarchshift1-16/+16
2014-09-01Replace GLEW with a glLoadGen loader.Yuri Kunde Schlesner6-7/+2805
This should fix the GL loading errors that occur in some drivers due to the use of deprecated functions by GLEW. Side benefits are more accurate auto-completion (deprecated function and symbols don't exist) and faster pointer loading (less entrypoints to load). In addition it removes an external library depency, simplifying the build system a bit and eliminating one set of binary libraries for Windows.
2014-08-28Downgrade GLSL version to 1.50 (compatible with GL 3.2)Yuri Kunde Schlesner3-10/+15
2014-08-26VideoCore: Fixes rendering issues on Qt and corrects framebuffer output size.bunnei2-4/+11
2014-08-26Rewrite of OpenGL renderer, including OS X supportKevin Hartman5-203/+315
Screen contents are now displayed using textured quads. This can be updated to expose an FBO once an OpenGL backend for when Pica rendering is being worked on. That FBO's texture can then be applied to the quads. Previously, FBO blitting was used in order to display screen contents, which did not work on OS X. The new textured quad approach is less of a compatibility risk.
2014-08-12Pica/GPU: Change hardware registers to use physical addresses rather than virtual ones.Tony Wasserka1-7/+7
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible. This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
2014-08-12Remove the fancy RegisterSet class introduced in 4c2bff61e.Tony Wasserka1-2/+2
While it was some nice and fancy template usage, it ultimately had many practical issues regarding length of involved expressions under regular usage as well as common code completion tools not being able to handle the structures. Instead, we now use a more conventional approach which is a lot more clean to use.
2014-07-23Use uniform formatting when printing hexadecimal numbers.Tony Wasserka1-1/+1
2014-07-23RegisterSet: Simplify code by using structs for register definition instead of unions.Tony Wasserka1-9/+9
2014-07-23GPU: Make use of RegisterSet.Tony Wasserka1-26/+28
2014-07-23Renderer: Fix component order in bottom framebuffer.Tony Wasserka2-5/+4
2014-07-23Renderer: Respect the active_fb GPU register.Tony Wasserka1-2/+9
2014-07-23Renderer: Add a few TODOs.Tony Wasserka1-3/+10
2014-06-12Rename LCD to GPU.Tony Wasserka1-3/+3
2014-05-20common_types: Changed BasicRect back to Rect, in the common namespacearchshift2-3/+3
Only Rect is in the namespace for now; the rest of common should be added in the future
2014-05-08Update FlipFramebufferSethpaien1-7/+6
Less calculations + fix
2014-05-01Reverse debugging changesarchshift1-2/+0
2014-05-01TGA dumps work, courtesy of @bunneiarchshift1-0/+2
2014-04-28Xcode complains that the class name is redundant.archshift1-1/+1
2014-04-28Rect to BasicRectarchshift2-3/+3
Somewhere along the line an OSX header had already taken the name Rect.
2014-04-28removed DISALLOW_COPY_AND_ASSIGN in favor of NonCopyable classbunnei1-1/+0
2014-04-27fixed renderer to use correct framebuffer locationbunnei2-8/+7
2014-04-22fixed GL context acquire (applies to Qt GUI only)bunnei1-0/+2
2014-04-18renamed hw_lcd module to just lcdbunnei1-1/+1
2014-04-17fixed framebuffer color orderbunnei1-1/+1
2014-04-17removed hard-coded framebuffer addresses from renderer_opengl.cppbunnei1-2/+4
2014-04-09fixed project includes to use new directory structurebunnei2-6/+7
2014-04-09got rid of 'src' folders in each sub-projectbunnei2-0/+370