diff options
author | Axel Davy <[email protected]> | 2016-10-18 20:48:54 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:44:22 +0100 |
commit | 93ac6dfdcce5260ee06b8c32306cb2af8ee782e3 (patch) | |
tree | b1286f745c78db50e3feb13cd57d4285e07bb679 /src/gallium/state_trackers/nine/nine_state.h | |
parent | 2a698c3df2a940a693d39c77692b32d946ccec1d (diff) |
st/nine: Back sampler states to nine_context
Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/nine_state.h')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/nine_state.h b/src/gallium/state_trackers/nine/nine_state.h index c648c0dce1a..b6b8d76833d 100644 --- a/src/gallium/state_trackers/nine/nine_state.h +++ b/src/gallium/state_trackers/nine/nine_state.h @@ -42,12 +42,14 @@ #define NINED3DRS_MULTISAMPLE (D3DRS_BLENDOPALPHA + 4) #define D3DRS_LAST D3DRS_BLENDOPALPHA +#define D3DSAMP_LAST D3DSAMP_DMAPOFFSET #define NINED3DRS_LAST NINED3DRS_MULTISAMPLE /* 214 */ #define NINED3DSAMP_LAST NINED3DSAMP_CUBETEX /* 16 */ #define NINED3DTSS_LAST D3DTSS_CONSTANT #define NINED3DTS_LAST D3DTS_WORLDMATRIX(255) #define D3DRS_COUNT (D3DRS_LAST + 1) +#define D3DSAMP_COUNT (D3DSAMP_LAST + 1) #define NINED3DRS_COUNT (NINED3DRS_LAST + 1) #define NINED3DSAMP_COUNT (NINED3DSAMP_LAST + 1) #define NINED3DTSS_COUNT (NINED3DTSS_LAST + 1) @@ -139,7 +141,7 @@ struct nine_state uint32_t vtxbuf; /* stateblocks only */ uint32_t stream_freq; /* stateblocks only */ uint32_t texture; /* stateblocks only */ - uint16_t sampler[NINE_MAX_SAMPLERS]; + uint16_t sampler[NINE_MAX_SAMPLERS]; /* stateblocks only */ struct nine_range *vs_const_f; struct nine_range *ps_const_f; struct nine_range *vs_const_i; @@ -186,8 +188,7 @@ struct nine_state struct NineBaseTexture9 *texture[NINE_MAX_SAMPLERS]; /* PS, DMAP, VS */ - DWORD samp[NINE_MAX_SAMPLERS][NINED3DSAMP_COUNT]; - DWORD samp_advertised[NINE_MAX_SAMPLERS][NINED3DSAMP_COUNT]; + DWORD samp_advertised[NINE_MAX_SAMPLERS][D3DSAMP_COUNT]; struct { struct { @@ -214,6 +215,7 @@ struct nine_state struct nine_context { struct { + uint16_t sampler[NINE_MAX_SAMPLERS]; uint32_t vtxbuf; } changed; @@ -240,6 +242,8 @@ struct nine_context { struct NineBaseTexture9 *texture[NINE_MAX_SAMPLERS]; + DWORD samp[NINE_MAX_SAMPLERS][NINED3DSAMP_COUNT]; + uint32_t samplers_shadow; uint8_t bound_samplers_mask_vs; @@ -291,6 +295,12 @@ nine_context_set_texture(struct NineDevice9 *device, struct NineBaseTexture9 *tex); void +nine_context_set_sampler_state(struct NineDevice9 *device, + DWORD Sampler, + D3DSAMPLERSTATETYPE Type, + DWORD Value); + +void nine_context_set_stream_source(struct NineDevice9 *device, UINT StreamNumber, struct NineVertexBuffer9 *pVBuf9, |