summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render')
-rw-r--r--src/osd/modules/render/bgfx/chain.cpp50
-rw-r--r--src/osd/modules/render/bgfx/chain.h6
-rw-r--r--src/osd/modules/render/bgfx/chainmanager.cpp46
-rw-r--r--src/osd/modules/render/bgfx/targetmanager.cpp4
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp2
-rw-r--r--src/osd/modules/render/drawd3d.cpp22
-rw-r--r--src/osd/modules/render/winglcontext.h2
7 files changed, 66 insertions, 66 deletions
diff --git a/src/osd/modules/render/bgfx/chain.cpp b/src/osd/modules/render/bgfx/chain.cpp
index 4ba069d18a4..5806c3ce042 100644
--- a/src/osd/modules/render/bgfx/chain.cpp
+++ b/src/osd/modules/render/bgfx/chain.cpp
@@ -34,11 +34,11 @@ bgfx_chain::bgfx_chain(std::string name, std::string author, bool transform, tar
, m_current_time(0)
, m_screen_index(screen_index)
{
- for (bgfx_target* target : m_target_list)
- {
- m_target_map[target->name()] = target;
- m_target_names.push_back(target->name());
- }
+ for (bgfx_target* target : m_target_list)
+ {
+ m_target_map[target->name()] = target;
+ m_target_names.push_back(target->name());
+ }
}
bgfx_chain::~bgfx_chain()
@@ -63,13 +63,13 @@ bgfx_chain::~bgfx_chain()
void bgfx_chain::repopulate_targets()
{
- for (size_t i = 0; i < m_target_names.size(); i++)
- {
- bgfx_target* target = m_targets.target(m_screen_index, m_target_names[i]);
- if (target != nullptr) {
- m_target_list[i] = target;
- }
- }
+ for (size_t i = 0; i < m_target_names.size(); i++)
+ {
+ bgfx_target* target = m_targets.target(m_screen_index, m_target_names[i]);
+ if (target != nullptr) {
+ m_target_list[i] = target;
+ }
+ }
}
void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_manager& textures, osd_window& window, uint64_t blend)
@@ -87,19 +87,19 @@ void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_m
bool orientation_swap_xy = (window.machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
bool rotation_swap_xy = (window.target()->orientation() & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
bool swap_xy = orientation_swap_xy ^ rotation_swap_xy;
-
- float screen_scale_x = 1.0f;
- float screen_scale_y = 1.0f;
- float screen_offset_x = 0.0f;
- float screen_offset_y = 0.0f;
- if (screen_device != nullptr)
- {
- render_container &screen_container = screen_device->container();
- screen_scale_x = 1.0f / screen_container.xscale();
- screen_scale_y = 1.0f / screen_container.yscale();
- screen_offset_x = -screen_container.xoffset();
- screen_offset_y = -screen_container.yoffset();
- }
+
+ float screen_scale_x = 1.0f;
+ float screen_scale_y = 1.0f;
+ float screen_offset_x = 0.0f;
+ float screen_offset_y = 0.0f;
+ if (screen_device != nullptr)
+ {
+ render_container &screen_container = screen_device->container();
+ screen_scale_x = 1.0f / screen_container.xscale();
+ screen_scale_y = 1.0f / screen_container.yscale();
+ screen_offset_x = -screen_container.xoffset();
+ screen_offset_y = -screen_container.yoffset();
+ }
for (bgfx_chain_entry* entry : m_entries)
{
diff --git a/src/osd/modules/render/bgfx/chain.h b/src/osd/modules/render/bgfx/chain.h
index bddec2c9bc3..157f92173cf 100644
--- a/src/osd/modules/render/bgfx/chain.h
+++ b/src/osd/modules/render/bgfx/chain.h
@@ -32,7 +32,7 @@ public:
~bgfx_chain();
void process(render_primitive* prim, int view, int screen, texture_manager& textures, osd_window &window, uint64_t blend = 0L);
- void repopulate_targets();
+ void repopulate_targets();
// Getters
std::vector<bgfx_slider*>& sliders() { return m_sliders; }
@@ -49,8 +49,8 @@ private:
std::vector<bgfx_parameter*> m_params;
std::vector<bgfx_chain_entry*> m_entries;
std::vector<bgfx_target*> m_target_list;
- std::vector<std::string> m_target_names;
- std::map<std::string, bgfx_target*> m_target_map;
+ std::vector<std::string> m_target_names;
+ std::map<std::string, bgfx_target*> m_target_map;
int64_t m_current_time;
uint32_t m_screen_index;
};
diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp
index d4c59f9bb6a..2116322f19a 100644
--- a/src/osd/modules/render/bgfx/chainmanager.cpp
+++ b/src/osd/modules/render/bgfx/chainmanager.cpp
@@ -293,17 +293,17 @@ void chain_manager::process_screen_quad(uint32_t view, uint32_t screen, render_p
bgfx_texture *texture = new bgfx_texture(full_name, bgfx::TextureFormat::RGBA8, tex_width, tex_height, mem, BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT);
m_textures.add_provider(full_name, texture);
- const bool any_targets_rebuilt = m_targets.update_target_sizes(screen, tex_width, tex_height, TARGET_STYLE_GUEST);
+ const bool any_targets_rebuilt = m_targets.update_target_sizes(screen, tex_width, tex_height, TARGET_STYLE_GUEST);
if (any_targets_rebuilt)
- {
- for (bgfx_chain* chain : m_screen_chains)
- {
- if (chain != nullptr)
- {
- chain->repopulate_targets();
- }
- }
- }
+ {
+ for (bgfx_chain* chain : m_screen_chains)
+ {
+ if (chain != nullptr)
+ {
+ chain->repopulate_targets();
+ }
+ }
+ }
bgfx_chain* chain = screen_chain(screen);
chain->process(prim, view, screen, m_textures, window, bgfx_util::get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags)));
@@ -441,19 +441,19 @@ uint32_t chain_manager::handle_screen_chains(uint32_t view, render_primitive *st
std::swap(screen_width, screen_height);
}
- const bool any_targets_rebuilt = m_targets.update_target_sizes(screen_index, screen_width, screen_height, TARGET_STYLE_NATIVE);
- if (any_targets_rebuilt)
- {
- for (bgfx_chain* chain : m_screen_chains)
- {
- if (chain != nullptr)
- {
- chain->repopulate_targets();
- }
- }
- }
-
- process_screen_quad(view + used_views, screen_index, prim, window);
+ const bool any_targets_rebuilt = m_targets.update_target_sizes(screen_index, screen_width, screen_height, TARGET_STYLE_NATIVE);
+ if (any_targets_rebuilt)
+ {
+ for (bgfx_chain* chain : m_screen_chains)
+ {
+ if (chain != nullptr)
+ {
+ chain->repopulate_targets();
+ }
+ }
+ }
+
+ process_screen_quad(view + used_views, screen_index, prim, window);
used_views += screen_chain(screen_index)->applicable_passes();
screen_index++;
diff --git a/src/osd/modules/render/bgfx/targetmanager.cpp b/src/osd/modules/render/bgfx/targetmanager.cpp
index 7e8577b95b3..dfc1678ee34 100644
--- a/src/osd/modules/render/bgfx/targetmanager.cpp
+++ b/src/osd/modules/render/bgfx/targetmanager.cpp
@@ -102,10 +102,10 @@ bool target_manager::update_target_sizes(uint32_t screen, uint16_t width, uint16
{
sizes[screen] = osd_dim(width, height);
rebuild_targets(screen, style);
- return true;
+ return true;
}
- return false;
+ return false;
}
void target_manager::rebuild_targets(uint32_t screen, uint32_t style)
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index feb88dc0add..38f23bb2afc 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -47,7 +47,7 @@ shaders::shaders() :
shadow_texture(nullptr), options(nullptr), avi_output_file(nullptr), avi_frame(0), avi_copy_surface(nullptr), avi_copy_texture(nullptr), avi_final_target(nullptr), avi_final_texture(nullptr),
black_surface(nullptr), black_texture(nullptr), render_snap(false), snap_rendered(false), snap_copy_target(nullptr), snap_copy_texture(nullptr), snap_target(nullptr), snap_texture(nullptr),
snap_width(0), snap_height(0), lines_pending(false), initialized(false), backbuffer(nullptr), curr_effect(nullptr), default_effect(nullptr), prescale_effect(nullptr), post_effect(nullptr),
- distortion_effect(nullptr), focus_effect(nullptr), phosphor_effect(nullptr), deconverge_effect(nullptr), color_effect(nullptr), ntsc_effect(nullptr), bloom_effect(nullptr),
+ distortion_effect(nullptr), focus_effect(nullptr), phosphor_effect(nullptr), deconverge_effect(nullptr), color_effect(nullptr), ntsc_effect(nullptr), bloom_effect(nullptr),
downsample_effect(nullptr), vector_effect(nullptr), fsfx_vertices(nullptr), curr_texture(nullptr), curr_render_target(nullptr), curr_poly(nullptr), targethead(nullptr), cachehead(nullptr)
{
}
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp
index ce024866319..a29b747bbe1 100644
--- a/src/osd/modules/render/drawd3d.cpp
+++ b/src/osd/modules/render/drawd3d.cpp
@@ -565,7 +565,7 @@ int renderer_d3d9::pre_window_draw_check()
m_shaders->toggle();
m_sliders_dirty = true;
- // re-create resources
+ // re-create resources
if (device_create_resources())
{
osd_printf_verbose("Direct3D: failed to recreate resources for device; failing permanently\n");
@@ -834,8 +834,8 @@ int renderer_d3d9::device_create(HWND device_hwnd)
try_again:
// try for XRGB first
m_screen_format = D3DFMT_X8R8G8B8;
- HRESULT result = d3dintf->d3dobj->CheckDeviceFormat(m_adapter, D3DDEVTYPE_HAL, m_pixformat,
- m_texture_manager->is_dynamic_supported()
+ HRESULT result = d3dintf->d3dobj->CheckDeviceFormat(m_adapter, D3DDEVTYPE_HAL, m_pixformat,
+ m_texture_manager->is_dynamic_supported()
? D3DUSAGE_DYNAMIC
: 0,
D3DRTYPE_TEXTURE, m_screen_format);
@@ -865,7 +865,7 @@ try_again:
// create the D3D device
result = d3dintf->d3dobj->CreateDevice(
- m_adapter, D3DDEVTYPE_HAL, device_hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &m_presentation, &m_device);
+ m_adapter, D3DDEVTYPE_HAL, device_hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &m_presentation, &m_device);
if (FAILED(result))
{
// if we got a "DEVICELOST" error, it may be transitory; count it and only fail if
@@ -923,7 +923,7 @@ int renderer_d3d9::device_create_resources()
HRESULT result = m_device->CreateVertexBuffer(
sizeof(vertex) * VERTEX_BUFFER_SIZE,
D3DUSAGE_DYNAMIC | D3DUSAGE_SOFTWAREPROCESSING | D3DUSAGE_WRITEONLY,
- VERTEX_BASE_FORMAT | ((m_shaders->enabled() && d3dintf->post_fx_available)
+ VERTEX_BASE_FORMAT | ((m_shaders->enabled() && d3dintf->post_fx_available)
? D3DFVF_XYZW
: D3DFVF_XYZRHW),
D3DPOOL_DEFAULT, &m_vertexbuf, nullptr);
@@ -935,8 +935,8 @@ int renderer_d3d9::device_create_resources()
// set the vertex format
result = m_device->SetFVF(
- (D3DFORMAT)(VERTEX_BASE_FORMAT | ((m_shaders->enabled() && d3dintf->post_fx_available)
- ? D3DFVF_XYZW
+ (D3DFORMAT)(VERTEX_BASE_FORMAT | ((m_shaders->enabled() && d3dintf->post_fx_available)
+ ? D3DFVF_XYZW
: D3DFVF_XYZRHW)));
if (FAILED(result))
{
@@ -993,9 +993,9 @@ renderer_d3d9::~renderer_d3d9()
// todo: throws error when switching from full screen to window mode
//if (m_shaders != nullptr)
//{
- // // delete the HLSL interface
- // global_free(m_shaders);
- // m_shaders = nullptr;
+ // // delete the HLSL interface
+ // global_free(m_shaders);
+ // m_shaders = nullptr;
//}
}
@@ -1686,7 +1686,7 @@ void renderer_d3d9::draw_line(const render_primitive &prim)
}
// now add a polygon entry
- m_poly[m_numpolys].init(D3DPT_TRIANGLESTRIP, 2, 4, prim.flags, nullptr, D3DTOP_MODULATE, 0.0f, 1.0f, 0.0f, 0.0f);
+ m_poly[m_numpolys].init(D3DPT_TRIANGLESTRIP, 2, 4, prim.flags, nullptr, D3DTOP_MODULATE, 0.0f, 1.0f, 0.0f, 0.0f);
m_numpolys++;
}
diff --git a/src/osd/modules/render/winglcontext.h b/src/osd/modules/render/winglcontext.h
index ec63b11ff72..f0cb1b6af77 100644
--- a/src/osd/modules/render/winglcontext.h
+++ b/src/osd/modules/render/winglcontext.h
@@ -156,7 +156,7 @@ private:
{
if (pfn_wglGetExtensionsStringEXT == nullptr)
return false;
-
+
// printf("%s\n", pfn_wglGetExtensionsStringEXT());
if (strstr(pfn_wglGetExtensionsStringEXT(), extension_name) != nullptr)