Commit 2d1aeb43 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Add empty sampler entries to the state table.

parent 7f973c93
......@@ -2127,4 +2127,21 @@ const struct StateEntry StateTable[] =
{ /*7, 30, undefined */ 0 /* -> sampler state in ddraw / d3d8 */, state_undefined },
{ /*7, 31, undefined */ 0 /* -> sampler state in ddraw / d3d8 */, state_undefined },
{ /*7, 32, WINED3DTSS_CONSTANT */ 0 /* As long as we don't support D3DTA_CONSTANT */, state_nogl },
/* Sampler states */
{ /* 0, Sampler 0 */ STATE_SAMPLER(0), state_undefined },
{ /* 1, Sampler 1 */ STATE_SAMPLER(1), state_undefined },
{ /* 2, Sampler 2 */ STATE_SAMPLER(2), state_undefined },
{ /* 3, Sampler 3 */ STATE_SAMPLER(3), state_undefined },
{ /* 4, Sampler 3 */ STATE_SAMPLER(4), state_undefined },
{ /* 5, Sampler 5 */ STATE_SAMPLER(5), state_undefined },
{ /* 6, Sampler 6 */ STATE_SAMPLER(6), state_undefined },
{ /* 7, Sampler 7 */ STATE_SAMPLER(7), state_undefined },
{ /* 8, Sampler 8 */ STATE_SAMPLER(8), state_undefined },
{ /* 9, Sampler 9 */ STATE_SAMPLER(9), state_undefined },
{ /*10, Sampler 10 */ STATE_SAMPLER(10), state_undefined },
{ /*11, Sampler 11 */ STATE_SAMPLER(11), state_undefined },
{ /*12, Sampler 12 */ STATE_SAMPLER(12), state_undefined },
{ /*13, Sampler 13 */ STATE_SAMPLER(13), state_undefined },
{ /*14, Sampler 14 */ STATE_SAMPLER(14), state_undefined },
{ /*15, Sampler 15 */ STATE_SAMPLER(15), state_undefined },
};
......@@ -416,7 +416,11 @@ typedef void (*APPLYSTATEFUNC)(DWORD state, IWineD3DStateBlockImpl *stateblock);
#define STATE_TEXTURESTAGE(stage, num) (STATE_RENDER(WINEHIGHEST_RENDER_STATE) + (stage) * WINED3D_HIGHEST_TEXTURE_STATE + (num))
#define STATE_IS_TEXTURESTAGE(a) ((a) >= STATE_TEXTURESTAGE(0, 1) && (a) <= STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
#define STATE_HIGHEST (STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
/* + 1 because samplers start with 0 */
#define STATE_SAMPLER(num) (STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE) + 1 + (num))
#define STATE_IS_SAMPLER(num) ((num) >= STATE_SAMPLER(0) && (num) <= STATE_SAMPLER(MAX_SAMPLERS - 1))
#define STATE_HIGHEST (STATE_SAMPLER(MAX_SAMPLERS - 1))
struct StateEntry
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment