Merge branch 'master' into vulkan
This commit is contained in:
commit
de059f3d57
|
@ -39,11 +39,13 @@ XeHSConstantDataOutput XePatchConstant(
|
|||
xe_tessellation_factor_range.x, xe_tessellation_factor_range.y);
|
||||
}
|
||||
|
||||
// On the Xbox 360, according to the presentation, the inside factor is the
|
||||
// minimum of the factors of the edges along the axis.
|
||||
// Direct3D 12:
|
||||
// [0] - along U.
|
||||
// [1] - along V.
|
||||
output.inside[0u] = min(output.edges[0u], output.edges[2u]);
|
||||
output.inside[1u] = min(output.edges[1u], output.edges[3u]);
|
||||
output.inside[0u] = min(output.edges[1u], output.edges[3u]);
|
||||
output.inside[1u] = min(output.edges[0u], output.edges[2u]);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,11 +1,11 @@
|
|||
// generated from `xb buildhlsl`
|
||||
// source: adaptive_quad.hs.hlsl
|
||||
const uint8_t adaptive_quad_hs[] = {
|
||||
0x44, 0x58, 0x42, 0x43, 0x09, 0x4F, 0xBB, 0x85, 0xF4, 0xA9, 0x5A, 0x24,
|
||||
0x49, 0x56, 0x0F, 0x66, 0x0D, 0xF9, 0x1F, 0xFD, 0x01, 0x00, 0x00, 0x00,
|
||||
0x38, 0x0F, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
|
||||
0x44, 0x58, 0x42, 0x43, 0x69, 0x9E, 0x19, 0x65, 0x4D, 0x36, 0x4D, 0x06,
|
||||
0xF1, 0xC9, 0xBB, 0xA5, 0x8A, 0x00, 0x59, 0x9E, 0x01, 0x00, 0x00, 0x00,
|
||||
0x54, 0x0F, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
|
||||
0xD4, 0x0A, 0x00, 0x00, 0x08, 0x0B, 0x00, 0x00, 0x3C, 0x0B, 0x00, 0x00,
|
||||
0x00, 0x0C, 0x00, 0x00, 0x9C, 0x0E, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
|
||||
0x00, 0x0C, 0x00, 0x00, 0xB8, 0x0E, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46,
|
||||
0x94, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0x53, 0x48,
|
||||
0x00, 0x05, 0x00, 0x00, 0x6A, 0x0A, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25,
|
||||
|
@ -257,8 +257,8 @@ const uint8_t adaptive_quad_hs[] = {
|
|||
0x53, 0x56, 0x5F, 0x54, 0x65, 0x73, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6F,
|
||||
0x72, 0x00, 0x53, 0x56, 0x5F, 0x49, 0x6E, 0x73, 0x69, 0x64, 0x65, 0x54,
|
||||
0x65, 0x73, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x00, 0xAB, 0xAB,
|
||||
0x53, 0x48, 0x45, 0x58, 0x94, 0x02, 0x00, 0x00, 0x51, 0x00, 0x03, 0x00,
|
||||
0xA5, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01, 0x93, 0x20, 0x00, 0x01,
|
||||
0x53, 0x48, 0x45, 0x58, 0xB0, 0x02, 0x00, 0x00, 0x51, 0x00, 0x03, 0x00,
|
||||
0xAC, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x01, 0x93, 0x20, 0x00, 0x01,
|
||||
0x94, 0x20, 0x00, 0x01, 0x95, 0x18, 0x00, 0x01, 0x96, 0x20, 0x00, 0x01,
|
||||
0x97, 0x18, 0x00, 0x01, 0x6A, 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x07,
|
||||
0x46, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
@ -305,25 +305,27 @@ const uint8_t adaptive_quad_hs[] = {
|
|||
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x04,
|
||||
0x12, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x5B, 0x00, 0x00, 0x04, 0x12, 0xB0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x04, 0x12, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x80, 0x01, 0x00, 0x33, 0x00, 0x00, 0x0A,
|
||||
0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xB0, 0x91, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x80, 0x01, 0x80, 0x41, 0x00, 0x00, 0x00,
|
||||
0x01, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x0A,
|
||||
0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xB0, 0x91, 0x00,
|
||||
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xB0, 0xD1, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x07, 0x12, 0x20, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
|
||||
0x94, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x04, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0A, 0x80, 0x01, 0x00, 0x36, 0x00, 0x00, 0x07, 0x12, 0x20, 0xD0, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01,
|
||||
0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
|
|
@ -127,8 +127,9 @@ dcl_output_siv o5.x, finalQuadVInsideTessFactor
|
|||
dcl_temps 1
|
||||
dcl_indexrange o4.x 2
|
||||
dcl_indexrange vpc0.x 4
|
||||
mov r0.x, vJoinInstanceID.x
|
||||
min r0.y, vpc[r0.x + 0].x, vpc[r0.x + 2].x
|
||||
mov o[r0.x + 4].x, r0.y
|
||||
iadd r0.x, -vJoinInstanceID.x, l(1)
|
||||
min r0.x, vpc[r0.x + 0].x, vpc[r0.x + 2].x
|
||||
mov r0.y, vJoinInstanceID.x
|
||||
mov o[r0.y + 4].x, r0.x
|
||||
ret
|
||||
// Approximately 14 instruction slots used
|
||||
// Approximately 15 instruction slots used
|
||||
|
|
|
@ -42,15 +42,19 @@ DECLARE_XAM_EXPORT1(XamNotifyCreateListener, kNone, kImplemented);
|
|||
// https://github.com/CodeAsm/ffplay360/blob/master/Common/AtgSignIn.cpp
|
||||
dword_result_t XNotifyGetNext(dword_t handle, dword_t match_id,
|
||||
lpdword_t id_ptr, lpdword_t param_ptr) {
|
||||
if (!handle) {
|
||||
return 0;
|
||||
if (param_ptr) {
|
||||
*param_ptr = 0;
|
||||
}
|
||||
|
||||
if (!id_ptr) {
|
||||
return X_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
*id_ptr = 0;
|
||||
// Grab listener.
|
||||
auto listener =
|
||||
kernel_state()->object_table()->LookupObject<XNotifyListener>(handle);
|
||||
if (!listener) {
|
||||
return 0;
|
||||
return X_ERROR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
bool dequeued = false;
|
||||
|
@ -65,21 +69,13 @@ dword_result_t XNotifyGetNext(dword_t handle, dword_t match_id,
|
|||
dequeued = listener->DequeueNotification(&id, ¶m);
|
||||
}
|
||||
|
||||
*id_ptr = dequeued ? id : 0;
|
||||
// param_ptr may be null - Ghost Recon Advanced Warfighter 2 Demo explicitly
|
||||
// passes nullptr in the code.
|
||||
// https://github.com/xenia-project/xenia/pull/1577
|
||||
if (dequeued) {
|
||||
*id_ptr = id;
|
||||
if (param_ptr) {
|
||||
*param_ptr = param;
|
||||
}
|
||||
} else {
|
||||
*id_ptr = 0;
|
||||
if (param_ptr) {
|
||||
*param_ptr = 0;
|
||||
}
|
||||
if (param_ptr) {
|
||||
*param_ptr = dequeued ? param : 0;
|
||||
}
|
||||
|
||||
return dequeued ? 1 : 0;
|
||||
}
|
||||
DECLARE_XAM_EXPORT2(XNotifyGetNext, kNone, kImplemented, kHighFrequency);
|
||||
|
|
|
@ -137,14 +137,21 @@ static_assert_size(X_USER_READ_PROFILE_SETTING, 40);
|
|||
|
||||
// https://github.com/oukiar/freestyledash/blob/master/Freestyle/Tools/Generic/xboxtools.cpp
|
||||
uint32_t xeXamUserReadProfileSettingsEx(uint32_t title_id, uint32_t user_index,
|
||||
uint32_t xuid_count, lpvoid_t xuids_ptr,
|
||||
uint32_t xuid_count, lpqword_t xuids,
|
||||
uint32_t setting_count,
|
||||
lpdword_t setting_ids, uint32_t unk,
|
||||
lpdword_t buffer_size_ptr,
|
||||
lpvoid_t buffer_ptr,
|
||||
uint32_t overlapped_ptr) {
|
||||
assert_zero(xuid_count);
|
||||
assert_zero(xuids_ptr.value());
|
||||
if (!xuid_count) {
|
||||
assert_null(xuids);
|
||||
} else {
|
||||
assert_true(xuid_count == 1);
|
||||
assert_not_null(xuids);
|
||||
// TODO(gibbed): allow proper lookup of arbitrary XUIDs
|
||||
const auto& user_profile = kernel_state()->user_profile();
|
||||
assert_true(static_cast<uint64_t>(xuids[0]) == user_profile->xuid());
|
||||
}
|
||||
assert_zero(unk);
|
||||
|
||||
// must have at least 1 to 32 settings
|
||||
|
@ -180,7 +187,7 @@ uint32_t xeXamUserReadProfileSettingsEx(uint32_t title_id, uint32_t user_index,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (xuids_ptr) {
|
||||
if (xuids) {
|
||||
// needed_header_size *= xuid_count;
|
||||
// needed_extra_size *= !xuid_count;
|
||||
}
|
||||
|
@ -276,22 +283,21 @@ uint32_t xeXamUserReadProfileSettingsEx(uint32_t title_id, uint32_t user_index,
|
|||
}
|
||||
|
||||
dword_result_t XamUserReadProfileSettings(
|
||||
dword_t title_id, dword_t user_index, dword_t xuid_count,
|
||||
lpvoid_t xuids_ptr, dword_t setting_count, lpdword_t setting_ids,
|
||||
lpdword_t buffer_size_ptr, lpvoid_t buffer_ptr, dword_t overlapped_ptr) {
|
||||
dword_t title_id, dword_t user_index, dword_t xuid_count, lpqword_t xuids,
|
||||
dword_t setting_count, lpdword_t setting_ids, lpdword_t buffer_size_ptr,
|
||||
lpvoid_t buffer_ptr, dword_t overlapped_ptr) {
|
||||
return xeXamUserReadProfileSettingsEx(
|
||||
title_id, user_index, xuid_count, xuids_ptr, setting_count, setting_ids,
|
||||
0, buffer_size_ptr, buffer_ptr, overlapped_ptr);
|
||||
title_id, user_index, xuid_count, xuids, setting_count, setting_ids, 0,
|
||||
buffer_size_ptr, buffer_ptr, overlapped_ptr);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamUserReadProfileSettings, kUserProfiles, kImplemented);
|
||||
|
||||
dword_result_t XamUserReadProfileSettingsEx(
|
||||
dword_t title_id, dword_t user_index, dword_t xuid_count,
|
||||
lpvoid_t xuids_ptr, dword_t setting_count, lpdword_t setting_ids,
|
||||
lpdword_t buffer_size_ptr, dword_t unk_2, lpvoid_t buffer_ptr,
|
||||
dword_t overlapped_ptr) {
|
||||
dword_t title_id, dword_t user_index, dword_t xuid_count, lpqword_t xuids,
|
||||
dword_t setting_count, lpdword_t setting_ids, lpdword_t buffer_size_ptr,
|
||||
dword_t unk_2, lpvoid_t buffer_ptr, dword_t overlapped_ptr) {
|
||||
return xeXamUserReadProfileSettingsEx(
|
||||
title_id, user_index, xuid_count, xuids_ptr, setting_count, setting_ids,
|
||||
title_id, user_index, xuid_count, xuids, setting_count, setting_ids,
|
||||
unk_2, buffer_size_ptr, buffer_ptr, overlapped_ptr);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamUserReadProfileSettingsEx, kUserProfiles, kImplemented);
|
||||
|
|
Loading…
Reference in New Issue