Lioncash
ade1bb1e95
decode/texture: Resolve unused variable warnings.
...
Some variables aren't used, so we can remove these.
Unfortunately, diagnostics are still reported on structured bindings
even when annotated with [[maybe_unused]], so we need to unpack the
elements that we want to use manually.
2020-04-16 22:45:41 -04:00
Lioncash
ef5b809b0d
decode/texture: Collapse loop down into std::generate
...
Same behavior, less code.
2020-04-16 22:29:07 -04:00
Lioncash
e50ca6a64f
decode/texture: Eliminate trivial missing field initializer warnings
...
We can just specify the initializers.
2020-04-16 22:27:21 -04:00
bunnei
7a4ed2581d
Merge pull request #3673 from lioncash/extra
...
CMakeLists: Specify -Wextra on linux builds
2020-04-16 21:12:33 -04:00
Rodrigo Locatti
35686128d2
Merge pull request #3689 from lioncash/unused-var
...
decode/shift: Remove unused variable within Shift()
2020-04-16 02:05:54 -03:00
Lioncash
3e1772a6af
decode/shift: Remove unused variable within Shift()
...
Removes a redundant variable that is already satisfied by the IsFull()
utility function.
2020-04-16 00:16:06 -04:00
Lioncash
38b955a3ff
control_flow: Make use of std::move in TryInspectAddress()
...
Eliminates redundant atomic reference count increments and decrements.
2020-04-15 23:31:22 -04:00
Lioncash
7ff67fc798
track: Eliminate redundant copies
...
Two variables can be references, while two others can be std::moved.
Makes for 4 less atomic reference count increments and decrements.
2020-04-15 21:50:09 -04:00
Lioncash
02e095313a
CMakeLists: Specify -Wextra on linux builds
...
Allows reporting more cases where logic errors may exist, such as
implicit fallthrough cases, etc.
We currently ignore unused parameters, since we currently have many
cases where this is intentional (virtual interfaces).
While we're at it, we can also tidy up any existing code that causes
warnings. This also uncovered a few bugs as well.
2020-04-15 21:33:46 -04:00
Fernando Sahmkow
d06795c08a
Merge pull request #3612 from ReinUsesLisp/red
...
shader/memory: Implement RED.E.ADD and minor changes to ATOM
2020-04-15 15:03:49 -04:00
ReinUsesLisp
ffceca76c9
shader/arithmetic: Add FCMP_CR variant
...
Adds another variant of FCMP.
2020-04-14 19:11:04 -03:00
Mat M
22b39e5855
Merge pull request #3619 from ReinUsesLisp/i2i
...
shader/conversion: Implement I2I sign extension, saturation and selection
2020-04-13 10:17:07 -04:00
Mat M
7c46c4325d
Merge pull request #3633 from ReinUsesLisp/clean-texdec
...
shader/texture: Remove type mismatches management from shader decoder
2020-04-13 10:13:05 -04:00
Fernando Sahmkow
1b20368a0a
Merge pull request #3578 from ReinUsesLisp/vmnmx
...
shader/video: Partially implement VMNMX
2020-04-12 10:44:03 -04:00
ReinUsesLisp
44e1a2c490
shader/video: Partially implement VMNMX
...
Implements the common usages for VMNMX. Inputs with a different size
than 32 bits are not supported and sign mismatches aren't supported
either.
VMNMX works as follows:
It grabs Ra and Rb and applies a maximum/minimum on them (this is
defined by .MX), having in mind the input sign. This result can then be
saturated. After the intermediate result is calculated, it applies
another operation on it using Rc. These operations are merges,
accumulations or another min/max pass.
This instruction allows to implement with a more flexible approach GCN's
min3 and max3 instructions (for instance).
2020-04-12 00:34:42 -03:00
ReinUsesLisp
57a3007e29
shader/texture: Remove type mismatches management from shader decoder
...
Since commit 9fce105f45
we handle type mismatches from the CPU.
We don't need to hack our shader decoder due to game bugs anymore.
Removed in this commit.
2020-04-10 00:57:32 -03:00
bunnei
85d89e0758
Merge pull request #3601 from ReinUsesLisp/some-shader-encodings
...
video_core/shader: Add some instruction and S2R encodings
2020-04-09 00:17:39 -04:00
Rodrigo Locatti
43f13f7fa1
Merge pull request #3489 from namkazt/patch-2
...
shader: implement SULD.D bits32/64
2020-04-07 16:21:09 -03:00
Nguyen Dac Nam
ca3161ee7e
address nit.
2020-04-07 18:29:30 +07:00
ReinUsesLisp
dbebae0027
shader/conversion: Implement I2I sign extension, saturation and selection
...
Reimplements I2I adding sign extension, saturation (clamp source value
to the destination), selection and destination sizes that are not 32
bits wide.
It doesn't implement CC yet.
2020-04-07 02:19:44 -03:00
Nguyen Dac Nam
e2349b001e
Apply suggestions from code review
...
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2020-04-07 07:55:49 +07:00
namkazy
a18e88be44
shader_decode: SULD.D using std::pair instead of out parameter
2020-04-06 13:46:55 +07:00
namkazy
319f68c624
shader_decode: SULD.D avoid duplicate code block.
2020-04-06 13:34:06 +07:00
namkazy
a6e264cd58
shader_decode: SULD.D fix conversion error.
2020-04-06 13:26:58 +07:00
namkazy
ca16317add
shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage.
2020-04-06 13:09:19 +07:00
ReinUsesLisp
d222e63967
shader/memory: Implement RED.E.ADD
...
Implements a reduction operation. It's an atomic operation that doesn't
return a value.
This commit introduces another primitive because some shading languages
might have a primitive for reduction operations.
2020-04-06 02:24:47 -03:00
ReinUsesLisp
e38cbb78ad
shader/memory: Add "using std::move"
2020-04-06 02:18:14 -03:00
ReinUsesLisp
e50c604505
shader/memory: Minor fixes in ATOM
2020-04-06 00:54:22 -03:00
Fernando Sahmkow
f6d6689b13
Merge pull request #3592 from ReinUsesLisp/ipa
...
shader_decompiler: Remove FragCoord.w hack and change IPA implementation
2020-04-05 19:29:40 -04:00
namkazy
d61a333362
silent warning (conversion error)
2020-04-05 16:02:07 +07:00
namkazy
15366b7474
shader_decode: SULD.D -> SINT actually same as UNORM.
2020-04-05 15:18:42 +07:00
namkazy
615eecd94e
shader_decode: SULD.D fix decode SNORM component
2020-04-05 14:46:43 +07:00
namkazy
dbd8cf0304
clang-format
2020-04-05 12:57:50 +07:00
namkazy
c26cea4ad2
shader_decode: get sampler descriptor from registry.
2020-04-05 12:54:48 +07:00
namkazy
8990c9a814
tweaking.
2020-04-05 10:31:32 +07:00
namkazy
2799ef5f43
cleanup unuse params
2020-04-05 10:31:31 +07:00
namkazy
35995111c9
cleanup debug code.
2020-04-05 10:31:30 +07:00
namkazy
2f42b04ae5
reimplement get component type, uncomment mistaken code
2020-04-05 10:31:30 +07:00
namkazy
d4038bf4ae
remove disable optimize
2020-04-05 10:31:30 +07:00
namkazy
e4402955e4
[wip] reimplement SULD.D
2020-04-05 10:31:29 +07:00
namkazy
67d9d397d2
add shader stage when init shader ir
2020-04-05 10:31:29 +07:00
Nguyen Dac Nam
731b0dbebc
clang-fix
2020-04-05 10:31:28 +07:00
Nguyen Dac Nam
4c3ddd9c99
shader: image - import PredCondition
2020-04-05 10:31:27 +07:00
Nguyen Dac Nam
9f407fad5e
shader: SULD.D bits32 implement more complexer method.
2020-04-05 10:31:27 +07:00
Nguyen Dac Nam
06fa4a3a41
shader: SULD.D import StoreType
2020-04-05 10:31:26 +07:00
Nguyen Dac Nam
94fecd1b68
shader: implement SULD.D bits32
2020-04-05 10:31:26 +07:00
ReinUsesLisp
bcca6c3fce
shader/other: Add error message for some S2R registers
2020-04-04 03:46:07 -03:00
ReinUsesLisp
2eef8d7249
shader_bytecode: Rename MOV_SYS to S2R
2020-04-04 03:37:51 -03:00
ReinUsesLisp
fc4fc348bc
shader_ir: Add error message for EXIT.FCSM_TR
2020-04-04 03:34:08 -03:00
ReinUsesLisp
ab3a1db282
shader/memory: Silence no return value warning
...
Silences a warning about control paths not all returning a value.
2020-04-02 03:34:27 -03:00