Unify some vertex shader related settings in the command tables

This commit is contained in:
Henrik Rydgard 2017-03-14 13:44:18 +01:00
parent cd6d5a0d7f
commit c74d6fcde7
5 changed files with 18 additions and 72 deletions

View File

@ -77,24 +77,6 @@ static const D3D11CommandTableEntry commandTable[] = {
// Changes that dirty the current texture.
{ GE_CMD_TEXSIZE0, FLAG_FLUSHBEFOREONCHANGE | FLAG_EXECUTE, 0, &GPU_D3D11::Execute_TexSize0 },
// These change the vertex shader so need flushing.
{ GE_CMD_REVERSENORMAL, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTINGENABLE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE0, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE1, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE2, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE3, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE0, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE1, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE2, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE3, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_MATERIALUPDATE, FLAG_FLUSHBEFOREONCHANGE },
// This changes both shaders so need flushing.
{ GE_CMD_LIGHTMODE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_TEXFILTER, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
{ GE_CMD_TEXWRAP, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
// Uniform changes
{ GE_CMD_ALPHATEST, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF | DIRTY_ALPHACOLORMASK },
{ GE_CMD_COLORREF, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF },

View File

@ -61,24 +61,6 @@ static const D3D9CommandTableEntry commandTable[] = {
// Changes that dirty the current texture.
{ GE_CMD_TEXSIZE0, FLAG_FLUSHBEFOREONCHANGE | FLAG_EXECUTE, 0, &GPU_DX9::Execute_TexSize0 },
// These change the vertex shader so need flushing.
{GE_CMD_REVERSENORMAL, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTINGENABLE, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE0, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE1, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE2, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE3, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE0, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE1, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE2, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE3, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_MATERIALUPDATE, FLAG_FLUSHBEFOREONCHANGE},
// This changes both shaders so need flushing.
{ GE_CMD_LIGHTMODE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_TEXFILTER, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
{ GE_CMD_TEXWRAP, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
// Uniform changes
{ GE_CMD_ALPHATEST, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF | DIRTY_ALPHACOLORMASK },
{ GE_CMD_COLORREF, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF },

View File

@ -65,24 +65,6 @@ static const GLESCommandTableEntry commandTable[] = {
// Changes that dirty the current texture.
{GE_CMD_TEXSIZE0, FLAG_FLUSHBEFOREONCHANGE | FLAG_EXECUTE, DIRTY_UVSCALEOFFSET, &GPU_GLES::Execute_TexSize0},
// These change the vertex shader so need flushing.
{GE_CMD_REVERSENORMAL, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTINGENABLE, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE0, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE1, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE2, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTENABLE3, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE0, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE1, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE2, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_LIGHTTYPE3, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_MATERIALUPDATE, FLAG_FLUSHBEFOREONCHANGE},
// This changes both shaders so need flushing.
{GE_CMD_LIGHTMODE, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_TEXFILTER, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS},
{GE_CMD_TEXWRAP, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS},
// Uniform changes
{GE_CMD_ALPHATEST, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF | DIRTY_ALPHACOLORMASK},
{GE_CMD_COLORREF, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF},

View File

@ -50,6 +50,24 @@ const CommonCommandTableEntry commonCommandTable[] = {
{ GE_CMD_FOG1, FLAG_FLUSHBEFOREONCHANGE, DIRTY_FOGCOEF },
{ GE_CMD_FOG2, FLAG_FLUSHBEFOREONCHANGE, DIRTY_FOGCOEF },
// These change the vertex shader so need flushing.
{ GE_CMD_REVERSENORMAL, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTINGENABLE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE0, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE1, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE2, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE3, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE0, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE1, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE2, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE3, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_MATERIALUPDATE, FLAG_FLUSHBEFOREONCHANGE },
// These change both shaders so need flushing.
{ GE_CMD_LIGHTMODE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_TEXFILTER, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
{ GE_CMD_TEXWRAP, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
// These affect the fragment shader so need flushing.
{ GE_CMD_CLEARMODE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_TEXTUREMAPENABLE, FLAG_FLUSHBEFOREONCHANGE },

View File

@ -61,24 +61,6 @@ static const VulkanCommandTableEntry commandTable[] = {
// Changes that dirty the current texture.
{ GE_CMD_TEXSIZE0, FLAG_FLUSHBEFOREONCHANGE | FLAG_EXECUTE, 0, &GPU_Vulkan::Execute_TexSize0 },
// These change the vertex shader so need flushing.
{ GE_CMD_REVERSENORMAL, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTINGENABLE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE0, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE1, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE2, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTENABLE3, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE0, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE1, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE2, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_LIGHTTYPE3, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_MATERIALUPDATE, FLAG_FLUSHBEFOREONCHANGE },
// This changes both shaders so need flushing.
{ GE_CMD_LIGHTMODE, FLAG_FLUSHBEFOREONCHANGE },
{ GE_CMD_TEXFILTER, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
{ GE_CMD_TEXWRAP, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS },
// Uniform changes
{ GE_CMD_ALPHATEST, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF | DIRTY_ALPHACOLORMASK },
{ GE_CMD_COLORREF, FLAG_FLUSHBEFOREONCHANGE, DIRTY_ALPHACOLORREF },