Lioncash
e831b80d69
gl_rasterizer_cache: Invert conditional in LoadGLBuffer()
...
It's generally easier to follow code using conditionals that operate in
terms of the true case followed by the false case (no chance of
overlooking the exclamation mark).
2018-08-08 23:34:57 -04:00
Lioncash
434f352eb3
gl_rasterizer_cache: Use std::vector::assign in LoadGLBuffer() for the non-tiled case
...
resize() causes the vector to expand and zero out the added members to
the vector, however we can avoid this zeroing by using assign().
Given we have the pointer to the data we want to copy, we can calculate
the end pointer and directly copy the range of data without the
need to perform the resize() beforehand.
2018-08-08 23:34:58 -04:00
Lioncash
557c466994
gl_rasterizer_cache: Make pointer const in LoadGLBuffer()
...
This is only ever read from, so we can make the data it's pointing to
const.
2018-08-08 23:14:57 -04:00
bunnei
25ba4d1b68
Merge pull request #982 from bunnei/stub-unk-63
...
gl_shader_decompiler: Stub input attribute Unknown_63.
2018-08-08 22:28:18 -04:00
bunnei
cf917a5e93
Merge pull request #976 from bunnei/shader-imm
...
gl_shader_decompiler: Let OpenGL interpret floats.
2018-08-08 19:17:01 -04:00
bunnei
9ceceb212f
Merge pull request #981 from bunnei/cbuf-corrupt
...
maxwell_3d: Use correct const buffer size and check bounds.
2018-08-08 19:16:34 -04:00
bunnei
cc2526dd51
Merge pull request #985 from bunnei/rt-r11g11b10
...
gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.
2018-08-08 18:21:34 -04:00
bunnei
096b04f1a4
Merge pull request #979 from bunnei/vtx88
...
maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.
2018-08-08 18:18:50 -04:00
bunnei
7bf422d58c
gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.
...
- Used by Super Mario Odyssey.
2018-08-08 02:42:14 -04:00
bunnei
7f0d0a93f7
gl_shader_decompiler: Stub input attribute Unknown_63.
2018-08-08 02:35:59 -04:00
bunnei
57982df105
maxwell_3d: Use correct const buffer size and check bounds.
...
- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
2018-08-08 02:10:25 -04:00
bunnei
8c6338b6f9
renderer_opengl: Use trace log in a few places.
2018-08-08 01:53:23 -04:00
bunnei
c120ed7d18
maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.
2018-08-08 01:50:53 -04:00
bunnei
e542356d0c
gl_shader_decompiler: Let OpenGL interpret floats.
...
- Accuracy is lost in translation to string, e.g. with NaN.
- Needed for Super Mario Odyssey.
2018-08-08 01:45:23 -04:00
bunnei
4fa3511a63
Merge pull request #964 from Hexagon12/lower-logs
...
Lowered down the logging for command processor methods
2018-08-07 19:00:19 -04:00
Hexagon12
7139f05fc5
Fixed the sRGB pixel format ( #963 )
...
* Changed the sRGB pixel format return
* Add a message about SRGBA -> RGBA conversion
2018-08-07 18:59:50 -04:00
Hexagon12
bc6d91a103
Lowered down the logging for methods
2018-08-07 19:51:40 +03:00
bunnei
904d7eaa94
maxwell_3d: Remove outdated assert.
2018-08-05 23:57:19 -04:00
bunnei
57eb936200
gl_rasterizer_cache: Avoid superfluous surface copies.
2018-08-05 23:40:03 -04:00
bunnei
c8e5c74092
Merge pull request #927 from bunnei/fix-texs
...
gl_shader_decompiler: Fix TEXS mask and dest.
2018-08-05 16:42:21 -04:00
bunnei
c0af42d6eb
Merge pull request #912 from lioncash/global-var
...
video_core: Eliminate the g_renderer global variable
2018-08-05 16:37:39 -04:00
bunnei
fd715e54a1
gl_shader_decompiler: Fix TEXS mask and dest.
2018-08-05 01:47:09 -04:00
David Marcec
b96010bfa9
added braces for conditions
2018-08-05 11:36:55 +10:00
David Marcec
6d1e30e041
fix the attrib format for ints
2018-08-05 11:29:21 +10:00
bunnei
13d6593753
Merge pull request #919 from lioncash/sign
...
gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()
2018-08-04 14:29:59 -04:00
Lioncash
3b678b9e8e
gl_shader_manager: Invert conditional in SetShaderUniformBlockBinding()
...
This lets us indent the majority of the code and places the error case
first.
2018-08-04 02:57:11 -04:00
Lioncash
dde5dce736
gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()
...
Ensures both operands have the same sign in the comparison.
While we're at it, we can get rid of the redundant casting of ub_size to
an int. This type will always be trivial and alias a built-in type (not
doing so would break backwards compatibility at a standard level).
2018-08-04 02:55:03 -04:00
Lioncash
2665457f4a
renderer_base: Make Rasterizer() return the rasterizer by reference
...
All calling code assumes that the rasterizer will be in a valid state,
which is a totally fine assumption. The only way the rasterizer wouldn't
be is if initialization is done incorrectly or fails, which is checked
against in System::Init().
2018-08-04 02:36:58 -04:00
Lioncash
6030c5ce41
video_core: Eliminate the g_renderer global variable
...
We move the initialization of the renderer to the core class, while
keeping the creation of it and any other specifics in video_core. This
way we can ensure that the renderer is initialized and doesn't give
unfettered access to the renderer. This also makes dependencies on types
more explicit.
For example, the GPU class doesn't need to depend on the
existence of a renderer, it only needs to care about whether or not it
has a rasterizer, but since it was accessing the global variable, it was
also making the renderer a part of its dependency chain. By adjusting
the interface, we can get rid of this dependency.
2018-08-04 02:36:57 -04:00
bunnei
762fcaf5de
Merge pull request #911 from lioncash/prototype
...
video_core: Remove unimplemented Start() function prototype
2018-08-04 02:18:38 -04:00
bunnei
29f31356d8
Merge pull request #910 from lioncash/unused
...
gl_shader_decompiler: Remove unused variable in GenerateDeclarations()
2018-08-03 15:54:11 -04:00
Lioncash
b4e050e6c4
video_core: Remove unimplemented Start() function prototype
...
Given this has no definition, we can just remove it entirely.
2018-08-03 12:48:14 -04:00
Lioncash
b45e5c2399
gl_shader_decompiler: Remove unused variable in GenerateDeclarations()
...
This variable was being incremented, but we were never actually using
it.
2018-08-03 12:18:31 -04:00
Lioncash
555d76d065
gl_shader_manager: Make ProgramManager's GetCurrentProgramStage() a const member function
...
This function doesn't modify class state, so it can be made const.
2018-08-03 12:08:17 -04:00
bunnei
00ba704a7f
Merge pull request #892 from lioncash/global
...
video_core: Make global EmuWindow instance part of the base renderer …
2018-08-03 00:31:32 -04:00
bunnei
52da0ce399
Merge pull request #901 from lioncash/ref
...
gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()
2018-08-02 23:00:56 -04:00
bunnei
bae1822aed
Merge pull request #902 from lioncash/array
...
gl_state: Make texture_units a std::array
2018-08-02 14:57:42 -04:00
greggameplayer
fe64e1d38e
Implement RGB32F PixelFormat ( #886 ) (used by Go Vacation)
2018-08-02 14:56:38 -04:00
Lioncash
6b32e24161
gl_state: Make texture_units a std::array
...
Gets rid of the use of a raw C array.
2018-08-02 11:19:58 -04:00
Lioncash
d92e8ab062
gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()
...
Avoids performing unnecessary copies of 65560 byte sized ShaderSetup
instances, considering it's only used as part of lookup and not
modified.
Given the parameters were already const, it's likely taking these
parameters by reference was intended but the ampersand was forgotten.
2018-08-02 11:09:46 -04:00
Lioncash
0f2ac928f2
video_core: Make global EmuWindow instance part of the base renderer class
...
Makes the global a member of the RendererBase class. We also change this
to be a reference. Passing any form of null pointer to these functions
is incorrect entirely, especially given the code itself assumes that the
pointer would always be in a valid state.
This also makes it easier to follow the lifecycle of instances being
used, as we explicitly interact the renderer with the rasterizer, rather
than it just operating on a global pointer.
2018-08-01 21:40:30 -04:00
Unknown
0d8fcab136
Implement R32_FLOAT RenderTargetFormat
2018-08-01 15:31:42 +02:00
bunnei
3575c076cb
Merge pull request #869 from Subv/ubsan
...
Corrected a few error cases detected by asan/ubsan
2018-07-31 09:24:13 -07:00
Subv
8191273a3d
MacroInterpreter: Avoid left shifting negative values.
...
The branch target is signed, so multiply by 4 instead of left shifting by 2
2018-07-30 20:38:24 -05:00
bunnei
e013fdc2b2
Merge pull request #808 from lioncash/mem-dedup
...
video_core/memory_manager: Avoid repeated unnecessary page slot lookups
2018-07-26 11:50:27 -07:00
Subv
f85cff0f48
GPU: Allow using R16F as a render target format.
2018-07-26 08:52:21 -05:00
Unknown
4672a01cbf
Implement R16_G16
...
correct trailing white spaces
Delete tabs
correct placement
Add RG16F & RG16UI & RG16I & RG16S PixelFormats
Return correct data according to changes done previously
correct PixelFormat declaration
correct coding style error
correct coding style error part 2
correct RG16S Declaration error
correct alignment
2018-07-26 02:01:29 +02:00
bunnei
c88382517c
Merge pull request #819 from Subv/srgb
...
GPU: Use the right texture format for sRGBA framebuffers.
2018-07-25 14:47:26 -07:00
Subv
c5b838aeef
GPU: Use the right texture format for sRGBA framebuffers.
2018-07-25 09:52:39 -05:00
Subv
ee8123bf13
GPU: Allow the use of Z24S8 as a texture format.
2018-07-25 09:41:24 -05:00