1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

cellGem: cellGemPrepareVideoConvert update

This commit is contained in:
Megamouse 2021-08-02 23:17:52 +02:00
parent dd7f24b20e
commit 2dd0f488a1
2 changed files with 14 additions and 5 deletions

View File

@ -1223,13 +1223,20 @@ error_code cellGemPrepareVideoConvert(vm::cptr<CellGemVideoConvertAttribute> vc_
const auto vc = *vc_attribute;
if (!vc_attribute || vc.version == 0 || vc.output_format == 0 ||
(vc.conversion_flags & CELL_GEM_COMBINE_PREVIOUS_INPUT_FRAME && !vc.buffer_memory))
if (!vc_attribute || vc.version != CELL_GEM_VERSION)
{
return CELL_GEM_ERROR_INVALID_PARAMETER;
}
if (vc.video_data_out & 0x1f || vc.buffer_memory & 0xff)
if (vc.output_format != CELL_GEM_NO_VIDEO_OUTPUT)
{
if (!vc.video_data_out || ((vc.conversion_flags & CELL_GEM_COMBINE_PREVIOUS_INPUT_FRAME) && !vc.buffer_memory))
{
return CELL_GEM_ERROR_INVALID_PARAMETER;
}
}
if (!vc.video_data_out.aligned(16) || !vc.buffer_memory.aligned(128))
{
return CELL_GEM_ERROR_INVALID_ALIGNMENT;
}

View File

@ -1,5 +1,7 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
static const float CELL_GEM_SPHERE_RADIUS_MM = 22.5f;
// Error codes
@ -265,7 +267,7 @@ struct CellGemVideoConvertAttribute
be_t<f32> red_gain;
be_t<f32> green_gain;
be_t<f32> blue_gain;
be_t<u32> buffer_memory;
be_t<u32> video_data_out;
vm::ptr<void> buffer_memory;
vm::ptr<void> video_data_out;
u8 alpha;
};