GPU: Texture bit should be ignored when drawing lines

Fixes line flickering in Vagrant Story.
This commit is contained in:
Connor McLaughlin 2020-02-07 00:10:36 +09:00
parent d67133b537
commit 7e862cd63e
2 changed files with 5 additions and 2 deletions

View file

@ -208,7 +208,10 @@ protected:
BitField<u32, bool, 28, 1> shading_enable; // 0 - flat, 1 = gouroud BitField<u32, bool, 28, 1> shading_enable; // 0 - flat, 1 = gouroud
BitField<u32, Primitive, 29, 21> primitive; BitField<u32, Primitive, 29, 21> primitive;
// Returns true if dithering should be enabled. Depends on the primitive type. /// Returns true if texturing should be enabled. Depends on the primitive type.
bool IsTexturingEnabled() const { return (primitive != Primitive::Line) ? texture_enable : false; }
/// Returns true if dithering should be enabled. Depends on the primitive type.
bool IsDitheringEnabled() const bool IsDitheringEnabled() const
{ {
switch (primitive) switch (primitive)

View file

@ -274,7 +274,7 @@ void GPU_HW::CopyVRAM(u32 src_x, u32 src_y, u32 dst_x, u32 dst_y, u32 width, u32
void GPU_HW::DispatchRenderCommand(RenderCommand rc, u32 num_vertices, const u32* command_ptr) void GPU_HW::DispatchRenderCommand(RenderCommand rc, u32 num_vertices, const u32* command_ptr)
{ {
TextureMode texture_mode; TextureMode texture_mode;
if (rc.texture_enable) if (rc.IsTexturingEnabled())
{ {
// texture page changed - check that the new page doesn't intersect the drawing area // texture page changed - check that the new page doesn't intersect the drawing area
if (m_draw_mode.IsTexturePageChanged()) if (m_draw_mode.IsTexturePageChanged())