rsx/gl: Minor refactoring; prepare vulkan backend

This commit is contained in:
kd-11 2017-02-16 21:29:56 +03:00
parent 1e826f5ccf
commit 7c73c3b75c
19 changed files with 1339 additions and 777 deletions

View file

@ -391,6 +391,9 @@ namespace rsx
// TODO: exit condition
while (!Emu.IsStopped())
{
//Execute backend-local tasks first
do_local_task();
const u32 get = ctrl->get;
const u32 put = ctrl->put;
@ -837,7 +840,7 @@ namespace rsx
return result;
}
RSXFragmentProgram thread::get_current_fragment_program(std::function<std::tuple<bool, u16>(u32, bool)> get_surface_info) const
RSXFragmentProgram thread::get_current_fragment_program(std::function<std::tuple<bool, u16>(u32, fragment_texture&, bool)> get_surface_info) const
{
RSXFragmentProgram result = {};
u32 shader_program = rsx::method_registers.shader_program_address();
@ -885,7 +888,7 @@ namespace rsx
bool surface_exists;
u16 surface_pitch;
std::tie(surface_exists, surface_pitch) = get_surface_info(texaddr, false);
std::tie(surface_exists, surface_pitch) = get_surface_info(texaddr, tex, false);
if (surface_exists && surface_pitch)
{
@ -894,7 +897,7 @@ namespace rsx
}
else
{
std::tie(surface_exists, surface_pitch) = get_surface_info(texaddr, true);
std::tie(surface_exists, surface_pitch) = get_surface_info(texaddr, tex, true);
if (surface_exists)
{
u32 format = raw_format & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN);