mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a9166f8546 | |||
| b77978fd1e | |||
| 4330cb9462 |
@@ -61,7 +61,8 @@ bool NullImageDescriptor(const DescriptorValue& descriptor) {
|
||||
bool ValidImageDescriptor(const DescriptorValue& descriptor, bool r128 = false) {
|
||||
const auto type = static_cast<Prospero::ImageType>((descriptor.dwords[3] >> 28u) & 0xfu);
|
||||
const auto format = static_cast<Prospero::BufferFormat>((descriptor.dwords[1] >> 20u) & 0x1ffu);
|
||||
if (type < Prospero::ImageType::kColor1D || format == Prospero::BufferFormat::kInvalid) {
|
||||
if (type < Prospero::ImageType::kColor1D || format == Prospero::BufferFormat::kInvalid ||
|
||||
format > Prospero::BufferFormat::kBc7Srgb) {
|
||||
return false;
|
||||
}
|
||||
if (r128 && type != Prospero::ImageType::kColor1D && type != Prospero::ImageType::kColor2D &&
|
||||
|
||||
+7
-13
@@ -145,7 +145,6 @@ struct RegisterDefaultsStorage {
|
||||
|
||||
static constexpr uint32_t GRAPHICS_REGISTER_DEFAULTS_MAX_VERSION = 13;
|
||||
static constexpr uint32_t GRAPHICS_REGISTER_DEFAULTS_FALLBACK_VERSION = 13;
|
||||
static constexpr uint32_t GRAPHICS_INIT_NO_FEATURE_STATE = 0;
|
||||
|
||||
static std::mutex g_register_defaults_mutex;
|
||||
|
||||
@@ -336,20 +335,12 @@ int KYTY_SYSV_ABI AgcInit(uint32_t* state, uint32_t ver) {
|
||||
"\t ver = %u\n",
|
||||
reinterpret_cast<uint64_t>(state), ver);
|
||||
|
||||
if (state == nullptr) {
|
||||
LOGF_COLOR(Log::Color::Red, "\t state is null\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
if (ver > GRAPHICS_REGISTER_DEFAULTS_MAX_VERSION) {
|
||||
LOGF_COLOR(Log::Color::Red, "\t unsupported version %u\n", ver);
|
||||
}
|
||||
|
||||
printf("version = %u\n", ver);
|
||||
|
||||
state[0] = ver;
|
||||
state[1] = GRAPHICS_INIT_NO_FEATURE_STATE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -903,8 +894,12 @@ static bool is_native_reg_indirect_packet(const uint32_t* cmd, RegIndirectPacket
|
||||
return ((cmd[0] >> 8u) & 0xffu) == reg_indirect_native_op(type);
|
||||
}
|
||||
|
||||
static constexpr bool is_trinity_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
static uint32_t reg_indirect_pm4_r(RegIndirectPacket type) {
|
||||
return (type == RegIndirectPacket::Uc && AgcGetIsTrinityMode() != 0 ? 1u : 0u);
|
||||
return (type == RegIndirectPacket::Uc && is_trinity_mode() ? 1u : 0u);
|
||||
}
|
||||
|
||||
static void reg_indirect_write_packet(uint32_t* cmd, uint64_t vaddr, uint32_t num_regs,
|
||||
@@ -1690,9 +1685,8 @@ uint64_t KYTY_SYSV_ABI AgcDcbContextStateOpGetSize(uint32_t operation) {
|
||||
return static_cast<uint64_t>(context_state_op_size_dw(operation)) * sizeof(uint32_t);
|
||||
}
|
||||
|
||||
uint64_t KYTY_SYSV_ABI AgcGetIsTrinityMode() {
|
||||
// PS5 Pro?
|
||||
return 0;
|
||||
void KYTY_SYSV_ABI AgcGetIsTrinityMode(uint8_t* result) {
|
||||
*result = is_trinity_mode();
|
||||
}
|
||||
|
||||
static constexpr int GRAPHICS5_DRIVER_ERROR_INVALID_VALUE = static_cast<int>(0x8a6c0033u);
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ int KYTY_SYSV_ABI AgcJumpPatchSetTarget(uint32_t* cmd, const volatile uint32_t*
|
||||
int KYTY_SYSV_ABI AgcSuspendPoint();
|
||||
uint32_t* KYTY_SYSV_ABI AgcDcbContextStateOp(CommandBuffer* buf, uint32_t operation);
|
||||
uint64_t KYTY_SYSV_ABI AgcDcbContextStateOpGetSize(uint32_t operation);
|
||||
uint64_t KYTY_SYSV_ABI AgcGetIsTrinityMode();
|
||||
void KYTY_SYSV_ABI AgcGetIsTrinityMode(uint8_t* result);
|
||||
|
||||
uint32_t KYTY_SYSV_ABI AgcDriverGetDefaultOwner();
|
||||
uint32_t KYTY_SYSV_ABI AgcDriverGetResourceRegistrationMaxNameLength();
|
||||
|
||||
Reference in New Issue
Block a user