diff options
Diffstat (limited to 'src/osd/modules/render/bgfx/chainmanager.cpp')
-rw-r--r-- | src/osd/modules/render/bgfx/chainmanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp index c2eea4c9a8b..6c22a640913 100644 --- a/src/osd/modules/render/bgfx/chainmanager.cpp +++ b/src/osd/modules/render/bgfx/chainmanager.cpp @@ -465,13 +465,13 @@ uint32_t chain_manager::update_screen_textures(uint32_t view, render_primitive * } bgfx::TextureFormat::Enum dst_format = bgfx::TextureFormat::RGBA8; - uint16_t pitch = tex_width; + uint16_t pitch = prim.m_rowpixels; const bgfx::Memory* mem = bgfx_util::mame_texture_data_to_bgfx_texture_data(dst_format, prim.m_flags & PRIMFLAG_TEXFORMAT_MASK, - tex_width, tex_height, prim.m_rowpixels, prim.m_prim->texture.palette, prim.m_prim->texture.base, &pitch); + prim.m_rowpixels, tex_height, prim.m_prim->texture.palette, prim.m_prim->texture.base, &pitch); if (texture == nullptr) { - bgfx_texture *texture = new bgfx_texture(full_name, dst_format, tex_width, tex_height, mem, BGFX_SAMPLER_U_CLAMP | BGFX_SAMPLER_V_CLAMP | BGFX_SAMPLER_MIN_POINT | BGFX_SAMPLER_MAG_POINT | BGFX_SAMPLER_MIP_POINT, pitch); + bgfx_texture *texture = new bgfx_texture(full_name, dst_format, tex_width, tex_height, mem, BGFX_SAMPLER_U_CLAMP | BGFX_SAMPLER_V_CLAMP | BGFX_SAMPLER_MIN_POINT | BGFX_SAMPLER_MAG_POINT | BGFX_SAMPLER_MIP_POINT, pitch, prim.m_rowpixels); m_textures.add_provider(full_name, texture); if (prim.m_prim->texture.palette) |