summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/chain.cpp
diff options
context:
space:
mode:
author Jezze <jezze@gmx.net>2016-09-28 15:22:38 +0200
committer Jezze <jezze@gmx.net>2016-09-28 15:30:43 +0200
commitecf1e166fc6342ecf0664fe1d3af7aecb621c650 (patch)
treef75605582b1bc87ea3b6a2989d9867ea4ea93096 /src/osd/modules/render/bgfx/chain.cpp
parent4727ff5e6a1e0aaa1d2b146b819250a6a83e8448 (diff)
Fixed several small issues in HLSL/BGFX
* fixed target texture dimension when -intoverscan is used (this fixes the appereance of scanline and shadow mask) * added target_scale and screen_count uniforms * rounded corners now remain aligned with screen bounds when -intoverscan is used (single screen only)
Diffstat (limited to 'src/osd/modules/render/bgfx/chain.cpp')
-rw-r--r--src/osd/modules/render/bgfx/chain.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/osd/modules/render/bgfx/chain.cpp b/src/osd/modules/render/bgfx/chain.cpp
index 5806c3ce042..352bb6f918c 100644
--- a/src/osd/modules/render/bgfx/chain.cpp
+++ b/src/osd/modules/render/bgfx/chain.cpp
@@ -77,9 +77,9 @@ void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_m
screen_device_iterator screen_iterator(window.machine().root_device());
screen_device* screen_device = screen_iterator.byindex(screen);
- int current_view = view;
- uint16_t screen_width(floor((prim->bounds.x1 - prim->bounds.x0) + 0.5f));
- uint16_t screen_height(floor((prim->bounds.y1 - prim->bounds.y0) + 0.5f));
+ uint16_t screen_count(window.target()->current_view()->screens().count());
+ uint16_t screen_width(floor(prim->get_quad_width() + 0.5f));
+ uint16_t screen_height(floor(prim->get_quad_height() + 0.5f));
uint32_t rotation_type =
(window.target()->orientation() & ROT90) == ROT90 ? 1 :
(window.target()->orientation() & ROT180) == ROT180 ? 2 :
@@ -101,11 +101,12 @@ void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_m
screen_offset_y = -screen_container.yoffset();
}
+ int current_view = view;
for (bgfx_chain_entry* entry : m_entries)
{
if (!entry->skip())
{
- entry->submit(current_view, prim, textures, screen_width, screen_height, screen_scale_x, screen_scale_y, screen_offset_x, screen_offset_y, rotation_type, swap_xy, blend, screen);
+ entry->submit(current_view, prim, textures, screen_count, screen_width, screen_height, screen_scale_x, screen_scale_y, screen_offset_x, screen_offset_y, rotation_type, swap_xy, blend, screen);
current_view++;
}
}