hlsl: fixed games with off-screen backdrop artworks

- e.g. atarifb, bowler
This commit is contained in:
ImJezze 2016-11-02 21:39:11 +01:00
parent a2c76b34d8
commit 51a81ef3aa
2 changed files with 10 additions and 3 deletions

View File

@ -1271,6 +1271,8 @@ int shaders::screen_pass(d3d_render_target *rt, int source_index, poly_info *pol
{
int next_index = source_index;
d3d->set_blendmode(PRIMFLAG_GET_BLENDMODE(poly->flags()));
curr_effect = default_effect;
curr_effect->update_uniforms();
curr_effect->set_technique("ScreenTechnique");
@ -1301,6 +1303,8 @@ int shaders::screen_pass(d3d_render_target *rt, int source_index, poly_info *pol
void shaders::ui_pass(poly_info *poly, int vertnum)
{
d3d->set_blendmode(PRIMFLAG_GET_BLENDMODE(poly->flags()));
curr_effect = default_effect;
curr_effect->update_uniforms();
curr_effect->set_technique("UiTechnique");

View File

@ -1857,9 +1857,6 @@ void renderer_d3d9::primitive_flush_pending()
set_modmode(m_poly[polynum].modmode());
}
// set the blendmode if different
set_blendmode(PRIMFLAG_GET_BLENDMODE(flags));
if (vertnum + m_poly[polynum].numverts() > m_numverts)
{
osd_printf_error("Error: vertnum (%d) plus poly vertex count (%d) > %d\n", vertnum, m_poly[polynum].numverts(), m_numverts);
@ -1870,10 +1867,16 @@ void renderer_d3d9::primitive_flush_pending()
if(m_shaders->enabled())
{
// reset blend mode (handled by shader passes)
set_blendmode(BLENDMODE_NONE);
m_shaders->render_quad(&m_poly[polynum], vertnum);
}
else
{
// set blend mode
set_blendmode(PRIMFLAG_GET_BLENDMODE(flags));
// add the primitives
result = m_device->DrawPrimitive(m_poly[polynum].type(), vertnum, m_poly[polynum].count());
if (FAILED(result))