diff options
author | Axel Davy <[email protected]> | 2018-09-22 11:05:19 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2018-09-25 22:05:24 +0200 |
commit | 8e0526555d56cf91e6af518d71da176e1a7b19c2 (patch) | |
tree | c39a3e360060cef5c4c9fe997b4d198c88bb37fe /src/gallium/state_trackers | |
parent | 5f7a41c33b233e315e1214a7692808def9f105f1 (diff) |
st/nine: Split NINE_STATE_FF_OTHER
NINE_STATE_FF_OTHER was mostly ff vs states.
Rename it to NINE_STATE_FF_VS_OTHER and
move common states with ps to
NINE_STATE_FF_PS_CONSTS (renamed from
NINE_STATE_FF_PSSTAGES).
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_ff.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.c | 30 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.h | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/stateblock9.c | 2 |
5 files changed, 23 insertions, 23 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 37fcba875ff..51e49ac4303 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -2350,7 +2350,7 @@ NineDevice9_CreateStateBlock( struct NineDevice9 *This, if (Type == D3DSBT_ALL || Type == D3DSBT_PIXELSTATE) { dst->changed.group |= NINE_STATE_PS | NINE_STATE_PS_CONST | NINE_STATE_BLEND | - NINE_STATE_FF_OTHER | NINE_STATE_FF_PSSTAGES | NINE_STATE_PS_CONST | + NINE_STATE_FF_VS_OTHER | NINE_STATE_FF_PS_CONSTS | NINE_STATE_PS_CONST | NINE_STATE_FB | NINE_STATE_DSA | NINE_STATE_MULTISAMPLE | NINE_STATE_RASTERIZER | NINE_STATE_STENCIL_REF; memcpy(dst->changed.rs, @@ -2539,7 +2539,7 @@ NineDevice9_SetTextureStageState( struct NineDevice9 *This, if (unlikely(This->is_recording)) { if (Type == D3DTSS_TEXTURETRANSFORMFLAGS) state->changed.group |= NINE_STATE_PS_PARAMS_MISC; - state->changed.group |= NINE_STATE_FF_PSSTAGES; + state->changed.group |= NINE_STATE_FF_PS_CONSTS; state->ff.changed.tex_stage[Stage][Type / 32] |= 1 << (Type % 32); } else nine_context_set_texture_stage_state(This, Stage, Type, Value); diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index 453f280c9fc..addea3dde1f 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -1949,7 +1949,7 @@ nine_ff_load_point_and_fog_params(struct NineDevice9 *device) struct nine_context *context = &device->context; struct fvec4 *dst = (struct fvec4 *)device->ff.vs_const; - if (!(context->changed.group & NINE_STATE_FF_OTHER)) + if (!(context->changed.group & NINE_STATE_FF_VS_OTHER)) return; dst[26].x = asfloat(context->rs[D3DRS_POINTSIZE_MIN]); dst[26].y = asfloat(context->rs[D3DRS_POINTSIZE_MAX]); @@ -1986,7 +1986,7 @@ nine_ff_load_ps_params(struct NineDevice9 *device) struct fvec4 *dst = (struct fvec4 *)device->ff.ps_const; unsigned s; - if (!(context->changed.group & (NINE_STATE_FF_PSSTAGES | NINE_STATE_FF_OTHER))) + if (!(context->changed.group & NINE_STATE_FF_PS_CONSTS)) return; for (s = 0; s < 8; ++s) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index cb62c28b7b7..3db9a07fbf4 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -1870,7 +1870,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_texture_stage_state, context->changed.group |= NINE_STATE_PS_CONST; } - context->changed.group |= NINE_STATE_FF_PSSTAGES; + context->changed.group |= NINE_STATE_FF_PS_CONSTS; context->ff.changed.tex_stage[Stage][Type / 32] |= 1 << (Type % 32); } @@ -2073,7 +2073,7 @@ nine_context_apply_stateblock(struct NineDevice9 *device, if (src->changed.group & NINE_STATE_FF_MATERIAL) context->ff.material = src->ff.material; - if (src->changed.group & NINE_STATE_FF_PSSTAGES) { + if (src->changed.group & NINE_STATE_FF_PS_CONSTS) { unsigned s; for (s = 0; s < NINE_MAX_TEXTURE_STAGES; ++s) { for (i = 0; i < NINED3DTSS_COUNT; ++i) @@ -2266,7 +2266,7 @@ nine_context_apply_stateblock(struct NineDevice9 *device, if (src->changed.group & NINE_STATE_FF_MATERIAL) nine_context_set_material(device, &src->ff.material); - if (src->changed.group & NINE_STATE_FF_PSSTAGES) { + if (src->changed.group & NINE_STATE_FF_PS_CONSTS) { unsigned s; for (s = 0; s < NINE_MAX_TEXTURE_STAGES; ++s) { for (i = 0; i < NINED3DTSS_COUNT; ++i) @@ -3531,11 +3531,11 @@ const uint32_t nine_render_state_group[NINED3DRS_LAST + 1] = [D3DRS_ALPHABLENDENABLE] = NINE_STATE_BLEND, [D3DRS_FOGENABLE] = NINE_STATE_FF_SHADER | 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_FOGCOLOR] = NINE_STATE_FF_PS_CONSTS | NINE_STATE_PS_CONST, [D3DRS_FOGTABLEMODE] = NINE_STATE_FF_SHADER | 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, + [D3DRS_FOGSTART] = NINE_STATE_FF_VS_OTHER | NINE_STATE_FF_PS_CONSTS | NINE_STATE_PS_CONST, + [D3DRS_FOGEND] = NINE_STATE_FF_VS_OTHER | NINE_STATE_FF_PS_CONSTS | NINE_STATE_PS_CONST, + [D3DRS_FOGDENSITY] = NINE_STATE_FF_VS_OTHER | NINE_STATE_FF_PS_CONSTS | NINE_STATE_PS_CONST, [D3DRS_RANGEFOGENABLE] = NINE_STATE_FF_SHADER, [D3DRS_STENCILENABLE] = NINE_STATE_DSA | NINE_STATE_MULTISAMPLE, [D3DRS_STENCILFAIL] = NINE_STATE_DSA, @@ -3545,7 +3545,7 @@ const uint32_t nine_render_state_group[NINED3DRS_LAST + 1] = [D3DRS_STENCILREF] = NINE_STATE_STENCIL_REF, [D3DRS_STENCILMASK] = NINE_STATE_DSA, [D3DRS_STENCILWRITEMASK] = NINE_STATE_DSA, - [D3DRS_TEXTUREFACTOR] = NINE_STATE_FF_PSSTAGES, + [D3DRS_TEXTUREFACTOR] = NINE_STATE_FF_PS_CONSTS, [D3DRS_WRAP0] = NINE_STATE_UNHANDLED, /* cylindrical wrap is crazy */ [D3DRS_WRAP1] = NINE_STATE_UNHANDLED, [D3DRS_WRAP2] = NINE_STATE_UNHANDLED, @@ -3567,21 +3567,21 @@ const uint32_t nine_render_state_group[NINED3DRS_LAST + 1] = [D3DRS_EMISSIVEMATERIALSOURCE] = NINE_STATE_FF_LIGHTING, [D3DRS_VERTEXBLEND] = NINE_STATE_FF_SHADER, [D3DRS_CLIPPLANEENABLE] = NINE_STATE_RASTERIZER, - [D3DRS_POINTSIZE] = NINE_STATE_RASTERIZER | NINE_STATE_FF_OTHER, - [D3DRS_POINTSIZE_MIN] = NINE_STATE_RASTERIZER | NINE_STATE_FF_OTHER | NINE_STATE_VS_PARAMS_MISC, + [D3DRS_POINTSIZE] = NINE_STATE_RASTERIZER | NINE_STATE_FF_VS_OTHER, + [D3DRS_POINTSIZE_MIN] = NINE_STATE_RASTERIZER | NINE_STATE_FF_VS_OTHER | NINE_STATE_VS_PARAMS_MISC, [D3DRS_POINTSPRITEENABLE] = NINE_STATE_RASTERIZER, [D3DRS_POINTSCALEENABLE] = NINE_STATE_FF_SHADER, - [D3DRS_POINTSCALE_A] = NINE_STATE_FF_OTHER, - [D3DRS_POINTSCALE_B] = NINE_STATE_FF_OTHER, - [D3DRS_POINTSCALE_C] = NINE_STATE_FF_OTHER, + [D3DRS_POINTSCALE_A] = NINE_STATE_FF_VS_OTHER, + [D3DRS_POINTSCALE_B] = NINE_STATE_FF_VS_OTHER, + [D3DRS_POINTSCALE_C] = NINE_STATE_FF_VS_OTHER, [D3DRS_MULTISAMPLEANTIALIAS] = NINE_STATE_MULTISAMPLE, [D3DRS_MULTISAMPLEMASK] = NINE_STATE_SAMPLE_MASK, [D3DRS_PATCHEDGESTYLE] = NINE_STATE_UNHANDLED, [D3DRS_DEBUGMONITORTOKEN] = NINE_STATE_UNHANDLED, - [D3DRS_POINTSIZE_MAX] = NINE_STATE_RASTERIZER | NINE_STATE_FF_OTHER | NINE_STATE_VS_PARAMS_MISC, + [D3DRS_POINTSIZE_MAX] = NINE_STATE_RASTERIZER | NINE_STATE_FF_VS_OTHER | NINE_STATE_VS_PARAMS_MISC, [D3DRS_INDEXEDVERTEXBLENDENABLE] = NINE_STATE_FF_SHADER, [D3DRS_COLORWRITEENABLE] = NINE_STATE_BLEND, - [D3DRS_TWEENFACTOR] = NINE_STATE_FF_OTHER, + [D3DRS_TWEENFACTOR] = NINE_STATE_FF_VS_OTHER, [D3DRS_BLENDOP] = NINE_STATE_BLEND, [D3DRS_POSITIONDEGREE] = NINE_STATE_UNHANDLED, [D3DRS_NORMALDEGREE] = NINE_STATE_UNHANDLED, diff --git a/src/gallium/state_trackers/nine/nine_state.h b/src/gallium/state_trackers/nine/nine_state.h index 77823655efa..a3cc66ef8b5 100644 --- a/src/gallium/state_trackers/nine/nine_state.h +++ b/src/gallium/state_trackers/nine/nine_state.h @@ -77,12 +77,12 @@ #define NINE_STATE_SAMPLE_MASK (1 << 19) #define NINE_STATE_FF (0x1f << 20) #define NINE_STATE_FF_VS (0x17 << 20) -#define NINE_STATE_FF_PS (0x18 << 20) +#define NINE_STATE_FF_PS (0x08 << 20) #define NINE_STATE_FF_LIGHTING (1 << 20) #define NINE_STATE_FF_MATERIAL (1 << 21) #define NINE_STATE_FF_VSTRANSF (1 << 22) -#define NINE_STATE_FF_PSSTAGES (1 << 23) -#define NINE_STATE_FF_OTHER (1 << 24) +#define NINE_STATE_FF_PS_CONSTS (1 << 23) +#define NINE_STATE_FF_VS_OTHER (1 << 24) #define NINE_STATE_VS_PARAMS_MISC (1 << 25) #define NINE_STATE_PS_PARAMS_MISC (1 << 26) #define NINE_STATE_MULTISAMPLE (1 << 27) diff --git a/src/gallium/state_trackers/nine/stateblock9.c b/src/gallium/state_trackers/nine/stateblock9.c index 54bf1e3c955..ebfd622ff91 100644 --- a/src/gallium/state_trackers/nine/stateblock9.c +++ b/src/gallium/state_trackers/nine/stateblock9.c @@ -293,7 +293,7 @@ nine_state_copy_common(struct NineDevice9 *device, if (mask->changed.group & NINE_STATE_FF_MATERIAL) dst->ff.material = src->ff.material; - if (mask->changed.group & NINE_STATE_FF_PSSTAGES) { + if (mask->changed.group & NINE_STATE_FF_PS_CONSTS) { for (s = 0; s < NINE_MAX_TEXTURE_STAGES; ++s) { for (i = 0; i < NINED3DTSS_COUNT; ++i) if (mask->ff.changed.tex_stage[s][i / 32] & (1 << (i % 32))) |