rsx: Remove some unused code.

This commit is contained in:
vlj 2016-08-26 15:45:12 +02:00
parent 1ede5cbc4c
commit a64053fd68
6 changed files with 9 additions and 42 deletions

View File

@ -220,7 +220,7 @@ void GLGSRender::begin()
blend_factor(rsx::method_registers.blend_func_sfactor_a()),
blend_factor(rsx::method_registers.blend_func_dfactor_a()));
if (m_surface.color_format == rsx::surface_color_format::w16z16y16x16) //TODO: check another color formats
if (rsx::method_registers.surface_color() == rsx::surface_color_format::w16z16y16x16) //TODO: check another color formats
{
u16 blend_color_r = rsx::method_registers.blend_color_16b_r();
u16 blend_color_g = rsx::method_registers.blend_color_16b_g();

View File

@ -20,7 +20,6 @@ private:
gl::glsl::program *m_program;
rsx::surface_info m_surface;
gl_render_targets m_rtts;
gl::gl_texture_cache m_gl_texture_cache;

View File

@ -204,7 +204,7 @@ void GLGSRender::read_buffers()
if (g_cfg_rsx_read_color_buffers)
{
auto color_format = rsx::internals::surface_color_format_to_gl(m_surface.color_format);
auto color_format = rsx::internals::surface_color_format_to_gl(rsx::method_registers.surface_color());
auto read_color_buffers = [&](int index, int count)
{
@ -293,16 +293,16 @@ void GLGSRender::read_buffers()
//Read failed. Fall back to slow s/w path...
auto depth_format = rsx::internals::surface_depth_format_to_gl(m_surface.depth_format);
int pixel_size = rsx::internals::get_pixel_size(m_surface.depth_format);
auto depth_format = rsx::internals::surface_depth_format_to_gl(rsx::method_registers.surface_depth_fmt());
int pixel_size = rsx::internals::get_pixel_size(rsx::method_registers.surface_depth_fmt());
gl::buffer pbo_depth;
__glcheck pbo_depth.create(m_surface.width * m_surface.height * pixel_size);
__glcheck pbo_depth.create(rsx::method_registers.surface_clip_width() * rsx::method_registers.surface_clip_height() * pixel_size);
__glcheck pbo_depth.map([&](GLubyte* pixels)
{
u32 depth_address = rsx::get_address(rsx::method_registers.surface_z_offset(), rsx::method_registers.surface_z_dma());
if (m_surface.depth_format == rsx::surface_depth_format::z16)
if (rsx::method_registers.surface_depth_fmt() == rsx::surface_depth_format::z16)
{
u16 *dst = (u16*)pixels;
const be_t<u16>* src = vm::ps3::_ptr<u16>(depth_address);
@ -336,7 +336,7 @@ void GLGSRender::write_buffers()
if (g_cfg_rsx_write_color_buffers)
{
auto color_format = rsx::internals::surface_color_format_to_gl(m_surface.color_format);
auto color_format = rsx::internals::surface_color_format_to_gl(rsx::method_registers.surface_color());
auto write_color_buffers = [&](int index, int count)
{
@ -404,11 +404,11 @@ void GLGSRender::write_buffers()
if (pitch <= 64)
return;
auto depth_format = rsx::internals::surface_depth_format_to_gl(m_surface.depth_format);
auto depth_format = rsx::internals::surface_depth_format_to_gl(rsx::method_registers.surface_depth_fmt());
u32 depth_address = rsx::get_address(rsx::method_registers.surface_z_offset(), rsx::method_registers.surface_z_dma());
u32 range = std::get<1>(m_rtts.m_bound_depth_stencil)->width() * std::get<1>(m_rtts.m_bound_depth_stencil)->height() * 2;
if (m_surface.depth_format != rsx::surface_depth_format::z16) range *= 2;
if (rsx::method_registers.surface_depth_fmt() != rsx::surface_depth_format::z16) range *= 2;
m_gl_texture_cache.save_render_target(depth_address, range, (*std::get<1>(m_rtts.m_bound_depth_stencil)));
}

View File

@ -327,7 +327,6 @@ namespace rsx
void thread::begin()
{
draw_inline_vertex_array = false;
inline_vertex_array.clear();
}

View File

@ -117,33 +117,6 @@ namespace rsx
void read(void *dst, u32 width, u32 height, u32 pitch);
};
struct surface_info
{
u8 log2height;
u8 log2width;
surface_antialiasing antialias;
surface_depth_format depth_format;
surface_color_format color_format;
u32 width;
u32 height;
u32 format;
void unpack(u32 surface_format)
{
format = surface_format;
log2height = surface_format >> 24;
log2width = (surface_format >> 16) & 0xff;
antialias = to_surface_antialiasing((surface_format >> 12) & 0xf);
depth_format = to_surface_depth_format((surface_format >> 5) & 0x7);
color_format = to_surface_color_format(surface_format & 0x1f);
width = 1 << (u32(log2width) + 1);
height = 1 << (u32(log2width) + 1);
}
};
struct vertex_array_buffer
{
rsx::vertex_base_type type;
@ -210,7 +183,6 @@ namespace rsx
u32 local_mem_addr, main_mem_addr;
bool strict_ordering[0x1000];
bool draw_inline_vertex_array;
std::vector<u32> inline_vertex_array;
bool m_rtts_dirty;
@ -222,8 +194,6 @@ namespace rsx
RSXVertexProgram get_current_vertex_program() const;
RSXFragmentProgram get_current_fragment_program() const;
public:
u32 draw_array_count;
u32 draw_array_first;
double fps_limit = 59.94;
public:

View File

@ -219,7 +219,6 @@ namespace rsx
void draw_inline_array(thread* rsx, u32 _reg, u32 arg)
{
rsx::method_registers.current_draw_clause.command = rsx::draw_command::inlined_array;
rsx->draw_inline_vertex_array = true;
rsx->inline_vertex_array.push_back(arg);
}