early-access version 2404
This commit is contained in:
parent
e02a55d571
commit
9fa6f1f261
3 changed files with 49 additions and 38 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2402.
|
This is the source code for early-access 2404.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ if (MSVC)
|
||||||
|
|
||||||
# /W3 - Level 3 warnings
|
# /W3 - Level 3 warnings
|
||||||
# /MP - Multi-threaded compilation
|
# /MP - Multi-threaded compilation
|
||||||
# /Zf - Improves PDB generation time in parallel builds
|
|
||||||
# /Zi - Output debugging information
|
# /Zi - Output debugging information
|
||||||
# /Zm - Specifies the precompiled header memory allocation limit
|
# /Zm - Specifies the precompiled header memory allocation limit
|
||||||
# /Zo - Enhanced debug info for optimized builds
|
# /Zo - Enhanced debug info for optimized builds
|
||||||
|
@ -37,9 +36,9 @@ if (MSVC)
|
||||||
# /GT - Supports fiber safety for data allocated using static thread-local storage
|
# /GT - Supports fiber safety for data allocated using static thread-local storage
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
/MP
|
/MP
|
||||||
/Zf
|
|
||||||
/Zi
|
/Zi
|
||||||
/Zm400
|
/Zm300
|
||||||
|
/Zf
|
||||||
/Zo
|
/Zo
|
||||||
/permissive-
|
/permissive-
|
||||||
/EHsc
|
/EHsc
|
||||||
|
|
|
@ -155,9 +155,6 @@ uint SwizzleOffset(uvec2 pos) {
|
||||||
// Replicates low num_bits such that [(to_bit - 1):(to_bit - 1 - from_bit)]
|
// Replicates low num_bits such that [(to_bit - 1):(to_bit - 1 - from_bit)]
|
||||||
// is the same as [(num_bits - 1):0] and repeats all the way down.
|
// is the same as [(num_bits - 1):0] and repeats all the way down.
|
||||||
uint Replicate(uint val, uint num_bits, uint to_bit) {
|
uint Replicate(uint val, uint num_bits, uint to_bit) {
|
||||||
if (num_bits == 0 || to_bit == 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
const uint v = val & uint((1 << num_bits) - 1);
|
const uint v = val & uint((1 << num_bits) - 1);
|
||||||
uint res = v;
|
uint res = v;
|
||||||
uint reslen = num_bits;
|
uint reslen = num_bits;
|
||||||
|
@ -187,7 +184,29 @@ uint ReplicateBitTo9(uint value) {
|
||||||
return REPLICATE_1_BIT_TO_9_TABLE[value];
|
return REPLICATE_1_BIT_TO_9_TABLE[value];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint FastReplicateTo8(uint value, uint num_bits) {
|
uint FastReplicate(uint value, uint num_bits, uint to_bit) {
|
||||||
|
if (num_bits == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (num_bits == to_bit) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
if (to_bit == 6) {
|
||||||
|
switch (num_bits) {
|
||||||
|
case 1:
|
||||||
|
return REPLICATE_1_BIT_TO_6_TABLE[value];
|
||||||
|
case 2:
|
||||||
|
return REPLICATE_2_BIT_TO_6_TABLE[value];
|
||||||
|
case 3:
|
||||||
|
return REPLICATE_3_BIT_TO_6_TABLE[value];
|
||||||
|
case 4:
|
||||||
|
return REPLICATE_4_BIT_TO_6_TABLE[value];
|
||||||
|
case 5:
|
||||||
|
return REPLICATE_5_BIT_TO_6_TABLE[value];
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else { /* if (to_bit == 8) */
|
||||||
switch (num_bits) {
|
switch (num_bits) {
|
||||||
case 1:
|
case 1:
|
||||||
return REPLICATE_1_BIT_TO_8_TABLE[value];
|
return REPLICATE_1_BIT_TO_8_TABLE[value];
|
||||||
|
@ -203,26 +222,19 @@ uint FastReplicateTo8(uint value, uint num_bits) {
|
||||||
return REPLICATE_6_BIT_TO_8_TABLE[value];
|
return REPLICATE_6_BIT_TO_8_TABLE[value];
|
||||||
case 7:
|
case 7:
|
||||||
return REPLICATE_7_BIT_TO_8_TABLE[value];
|
return REPLICATE_7_BIT_TO_8_TABLE[value];
|
||||||
case 8:
|
default:
|
||||||
return value;
|
break;
|
||||||
}
|
}
|
||||||
return Replicate(value, num_bits, 8);
|
}
|
||||||
|
return Replicate(value, num_bits, to_bit);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint FastReplicateTo8(uint value, uint num_bits) {
|
||||||
|
return FastReplicate(value, num_bits, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint FastReplicateTo6(uint value, uint num_bits) {
|
uint FastReplicateTo6(uint value, uint num_bits) {
|
||||||
switch (num_bits) {
|
return FastReplicate(value, num_bits, 6);
|
||||||
case 1:
|
|
||||||
return REPLICATE_1_BIT_TO_6_TABLE[value];
|
|
||||||
case 2:
|
|
||||||
return REPLICATE_2_BIT_TO_6_TABLE[value];
|
|
||||||
case 3:
|
|
||||||
return REPLICATE_3_BIT_TO_6_TABLE[value];
|
|
||||||
case 4:
|
|
||||||
return REPLICATE_4_BIT_TO_6_TABLE[value];
|
|
||||||
case 5:
|
|
||||||
return REPLICATE_5_BIT_TO_6_TABLE[value];
|
|
||||||
}
|
|
||||||
return Replicate(value, num_bits, 6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint Div3Floor(uint v) {
|
uint Div3Floor(uint v) {
|
||||||
|
|
Loading…
Reference in a new issue