mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
fixed nv3089::image_in scale value
This commit is contained in:
parent
8912b9880e
commit
f7e787958e
2 changed files with 19 additions and 5 deletions
|
@ -350,14 +350,19 @@ namespace rsx
|
||||||
void thread::end()
|
void thread::end()
|
||||||
{
|
{
|
||||||
vertex_index_array.clear();
|
vertex_index_array.clear();
|
||||||
|
|
||||||
for (auto &vertex_array : vertex_arrays)
|
for (auto &vertex_array : vertex_arrays)
|
||||||
|
{
|
||||||
vertex_array.clear();
|
vertex_array.clear();
|
||||||
|
}
|
||||||
|
|
||||||
transform_constants.clear();
|
transform_constants.clear();
|
||||||
|
|
||||||
if (capture_current_frame)
|
if (capture_current_frame)
|
||||||
|
{
|
||||||
capture_frame("Draw " + std::to_string(vertex_draw_count));
|
capture_frame("Draw " + std::to_string(vertex_draw_count));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void thread::on_task()
|
void thread::on_task()
|
||||||
{
|
{
|
||||||
|
|
|
@ -459,10 +459,19 @@ namespace rsx
|
||||||
|
|
||||||
u32 out_offset = out_x * out_bpp + out_pitch * out_y;
|
u32 out_offset = out_x * out_bpp + out_pitch * out_y;
|
||||||
|
|
||||||
bool need_clip = method_registers[NV3089_CLIP_SIZE] != method_registers[NV3089_IMAGE_IN_SIZE] || method_registers[NV3089_CLIP_POINT];
|
f32 scale_x = 1048576.f / method_registers[NV3089_DS_DX];
|
||||||
bool need_convert = out_format != in_format || out_w != in_w || out_h != in_h;
|
f32 scale_y = 1048576.f / method_registers[NV3089_DT_DY];
|
||||||
|
|
||||||
u32 slice_h = (u32)(clip_h * (method_registers[NV3089_DS_DX] / 1048576.f));
|
u32 slice_h = (u32)(clip_h * (1.0 / scale_y));
|
||||||
|
|
||||||
|
u32 convert_w = (u32)(scale_x * in_w);
|
||||||
|
u32 convert_h = (u32)(scale_y * in_h);
|
||||||
|
|
||||||
|
bool need_clip =
|
||||||
|
method_registers[NV3089_CLIP_SIZE] != method_registers[NV3089_IMAGE_IN_SIZE] ||
|
||||||
|
method_registers[NV3089_CLIP_POINT] || convert_w != out_w || convert_h != out_h;
|
||||||
|
|
||||||
|
bool need_convert = out_format != in_format || scale_x != 1.0 || scale_y != 1.0;
|
||||||
|
|
||||||
if (slice_h)
|
if (slice_h)
|
||||||
{
|
{
|
||||||
|
@ -484,7 +493,7 @@ namespace rsx
|
||||||
{
|
{
|
||||||
if (need_convert)
|
if (need_convert)
|
||||||
{
|
{
|
||||||
convert_scale_image(temp1, out_format, out_w, out_h, out_pitch,
|
convert_scale_image(temp1, out_format, convert_w, convert_h, out_pitch,
|
||||||
pixels_src, in_format, in_w, in_h, in_pitch, slice_h, in_inter ? true : false);
|
pixels_src, in_format, in_w, in_h, in_pitch, slice_h, in_inter ? true : false);
|
||||||
|
|
||||||
clip_image(pixels_dst + out_offset, temp1.get(), clip_x, clip_y, clip_w, clip_h, out_bpp, out_pitch, out_pitch);
|
clip_image(pixels_dst + out_offset, temp1.get(), clip_x, clip_y, clip_w, clip_h, out_bpp, out_pitch, out_pitch);
|
||||||
|
@ -526,7 +535,7 @@ namespace rsx
|
||||||
{
|
{
|
||||||
if (need_convert)
|
if (need_convert)
|
||||||
{
|
{
|
||||||
convert_scale_image(temp1, out_format, out_w, out_h, out_pitch,
|
convert_scale_image(temp1, out_format, convert_w, convert_h, out_pitch,
|
||||||
pixels_src, in_format, in_w, in_h, in_pitch, slice_h, in_inter ? true : false);
|
pixels_src, in_format, in_w, in_h, in_pitch, slice_h, in_inter ? true : false);
|
||||||
|
|
||||||
clip_image(temp2, temp1.get(), clip_x, clip_y, clip_w, clip_h, out_bpp, out_pitch, out_pitch);
|
clip_image(temp2, temp1.get(), clip_x, clip_y, clip_w, clip_h, out_bpp, out_pitch, out_pitch);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue