st/nine: Minor refactor of a few NINE_STATE_* flags
authorAxel Davy <davyaxel0@gmail.com>
Sun, 8 Apr 2018 12:33:45 +0000 (14:33 +0200)
committerAxel Davy <davyaxel0@gmail.com>
Tue, 25 Sep 2018 20:05:24 +0000 (22:05 +0200)
Rename NINE_STATE_FOG_SHADER,
NINE_STATE_POINTSIZE_SHADER and NINE_STATE_PS1X_SHADER
into
NINE_STATE_VS_PARAMS_MISC and NINE_STATE_PS_PARAMS_MISC.

The behaviour is unchanged, except one minor change:
D3DRS_FOGTABLEMODE doesn't need to affect VS.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/nine_state.c
src/gallium/state_trackers/nine/nine_state.h

index 04f90ad821095cd836fa2ae282047ed923857e52..37fcba875ff3b98818edd3b1d7caa3ea305aa35b 100644 (file)
@@ -2538,7 +2538,7 @@ NineDevice9_SetTextureStageState( struct NineDevice9 *This,
 
     if (unlikely(This->is_recording)) {
         if (Type == D3DTSS_TEXTURETRANSFORMFLAGS)
-            state->changed.group |= NINE_STATE_PS1X_SHADER;
+            state->changed.group |= NINE_STATE_PS_PARAMS_MISC;
         state->changed.group |= NINE_STATE_FF_PSSTAGES;
         state->ff.changed.tex_stage[Stage][Type / 32] |= 1 << (Type % 32);
     } else
index c81a05a952b91eba0e47bc28a4ee462146470ea1..3ab90633d25ddefb3c1e582c1f78a0dfc86409b1 100644 (file)
@@ -1077,15 +1077,13 @@ commit_ps(struct NineDevice9 *device)
 #define NINE_STATE_SHADER_CHANGE_VS \
    (NINE_STATE_VS |         \
     NINE_STATE_TEXTURE |    \
-    NINE_STATE_FOG_SHADER | \
-    NINE_STATE_POINTSIZE_SHADER | \
+    NINE_STATE_VS_PARAMS_MISC | \
     NINE_STATE_SWVP)
 
 #define NINE_STATE_SHADER_CHANGE_PS \
    (NINE_STATE_PS |         \
     NINE_STATE_TEXTURE |    \
-    NINE_STATE_FOG_SHADER | \
-    NINE_STATE_PS1X_SHADER)
+    NINE_STATE_PS_PARAMS_MISC)
 
 #define NINE_STATE_FREQUENT \
    (NINE_STATE_RASTERIZER | \
@@ -1861,7 +1859,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_texture_stage_state,
         bumpmap_index = 4 * 8 + 2 * Stage + 1;
         break;
     case D3DTSS_TEXTURETRANSFORMFLAGS:
-        context->changed.group |= NINE_STATE_PS1X_SHADER;
+        context->changed.group |= NINE_STATE_PS_PARAMS_MISC;
         break;
     default:
         break;
@@ -3531,10 +3529,10 @@ const uint32_t nine_render_state_group[NINED3DRS_LAST + 1] =
     [D3DRS_ALPHAFUNC] = NINE_STATE_DSA,
     [D3DRS_DITHERENABLE] = NINE_STATE_BLEND,
     [D3DRS_ALPHABLENDENABLE] = NINE_STATE_BLEND,
-    [D3DRS_FOGENABLE] = NINE_STATE_FF_OTHER | NINE_STATE_FOG_SHADER | NINE_STATE_PS_CONST,
+    [D3DRS_FOGENABLE] = NINE_STATE_FF_OTHER | NINE_STATE_VS_PARAMS_MISC | NINE_STATE_PS_PARAMS_MISC | NINE_STATE_PS_CONST,
     [D3DRS_SPECULARENABLE] = NINE_STATE_FF_LIGHTING,
     [D3DRS_FOGCOLOR] = NINE_STATE_FF_OTHER | NINE_STATE_PS_CONST,
-    [D3DRS_FOGTABLEMODE] = NINE_STATE_FF_OTHER | NINE_STATE_FOG_SHADER | NINE_STATE_PS_CONST,
+    [D3DRS_FOGTABLEMODE] = NINE_STATE_FF_OTHER | NINE_STATE_PS_PARAMS_MISC | NINE_STATE_PS_CONST,
     [D3DRS_FOGSTART] = NINE_STATE_FF_OTHER | NINE_STATE_PS_CONST,
     [D3DRS_FOGEND] = NINE_STATE_FF_OTHER | NINE_STATE_PS_CONST,
     [D3DRS_FOGDENSITY] = NINE_STATE_FF_OTHER | NINE_STATE_PS_CONST,
@@ -3570,7 +3568,7 @@ const uint32_t nine_render_state_group[NINED3DRS_LAST + 1] =
     [D3DRS_VERTEXBLEND] = NINE_STATE_FF_OTHER,
     [D3DRS_CLIPPLANEENABLE] = NINE_STATE_RASTERIZER,
     [D3DRS_POINTSIZE] = NINE_STATE_RASTERIZER,
-    [D3DRS_POINTSIZE_MIN] = NINE_STATE_RASTERIZER | NINE_STATE_POINTSIZE_SHADER,
+    [D3DRS_POINTSIZE_MIN] = NINE_STATE_RASTERIZER | NINE_STATE_VS_PARAMS_MISC,
     [D3DRS_POINTSPRITEENABLE] = NINE_STATE_RASTERIZER,
     [D3DRS_POINTSCALEENABLE] = NINE_STATE_FF_OTHER,
     [D3DRS_POINTSCALE_A] = NINE_STATE_FF_OTHER,
@@ -3580,7 +3578,7 @@ const uint32_t nine_render_state_group[NINED3DRS_LAST + 1] =
     [D3DRS_MULTISAMPLEMASK] = NINE_STATE_SAMPLE_MASK,
     [D3DRS_PATCHEDGESTYLE] = NINE_STATE_UNHANDLED,
     [D3DRS_DEBUGMONITORTOKEN] = NINE_STATE_UNHANDLED,
-    [D3DRS_POINTSIZE_MAX] = NINE_STATE_RASTERIZER | NINE_STATE_POINTSIZE_SHADER,
+    [D3DRS_POINTSIZE_MAX] = NINE_STATE_RASTERIZER | NINE_STATE_VS_PARAMS_MISC,
     [D3DRS_INDEXEDVERTEXBLENDENABLE] = NINE_STATE_FF_OTHER,
     [D3DRS_COLORWRITEENABLE] = NINE_STATE_BLEND,
     [D3DRS_TWEENFACTOR] = NINE_STATE_FF_OTHER,
index f5fd1ef9cd878d5162f815763cd77baa12d6466d..b8a74a4ee2fa079e163e3979d6660a9c382d9a0d 100644 (file)
 #define NINE_STATE_FF_VSTRANSF (1 << 22)
 #define NINE_STATE_FF_PSSTAGES (1 << 23)
 #define NINE_STATE_FF_OTHER    (1 << 24)
-#define NINE_STATE_FOG_SHADER  (1 << 25)
-#define NINE_STATE_PS1X_SHADER (1 << 26)
-#define NINE_STATE_POINTSIZE_SHADER (1 << 27)
-#define NINE_STATE_MULTISAMPLE (1 << 28)
-#define NINE_STATE_SWVP        (1 << 29)
-#define NINE_STATE_ALL          0x3fffffff
-#define NINE_STATE_UNHANDLED   (1 << 30)
+#define NINE_STATE_VS_PARAMS_MISC  (1 << 25)
+#define NINE_STATE_PS_PARAMS_MISC (1 << 26)
+#define NINE_STATE_MULTISAMPLE (1 << 27)
+#define NINE_STATE_SWVP        (1 << 28)
+#define NINE_STATE_ALL          0x1fffffff
+#define NINE_STATE_UNHANDLED   (1 << 29)
 
 #define NINE_STATE_COMMIT_DSA  (1 << 0)
 #define NINE_STATE_COMMIT_RASTERIZER (1 << 1)