summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-09-15 23:00:02 +0200
committerAxel Davy <[email protected]>2016-10-10 23:43:49 +0200
commit56ea3df7d437f3f4460992f18eae3dbf00af8ab9 (patch)
tree0dbd422c0590c4d50517894e116f5cc5543543e6 /src/gallium/state_trackers
parent747f1ef8b6f0ea78f247504ef55e72d8aa3f733a (diff)
st/nine: Initial mixed vertex processing support
In mixed vertex processing, the user can enable or disable software vertex processing. It is on hardware by default. This feature is not a state, and thus the setting doesn't need to be recorded by stateblocks. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/nine/device9.c18
-rw-r--r--src/gallium/state_trackers/nine/device9.h3
2 files changed, 16 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 075ed7c0f47..2ec8cb6f201 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -165,10 +165,14 @@ NineDevice9_ctor( struct NineDevice9 *This,
if (!(This->params.BehaviorFlags & D3DCREATE_FPU_PRESERVE))
nine_setup_fpu();
- if (This->params.BehaviorFlags & D3DCREATE_SOFTWARE_VERTEXPROCESSING)
- DBG("Application asked full Software Vertex Processing. Ignoring.\n");
+ if (This->params.BehaviorFlags & D3DCREATE_SOFTWARE_VERTEXPROCESSING) {
+ DBG("Application asked full Software Vertex Processing.\n");
+ This->swvp = true;
+ } else
+ This->swvp = false;
if (This->params.BehaviorFlags & D3DCREATE_MIXED_VERTEXPROCESSING)
- DBG("Application asked mixed Software Vertex Processing. Ignoring.\n");
+ DBG("Application asked mixed Software Vertex Processing.\n");
+ /* TODO: check if swvp is resetted by device Resets */
This->pipe = This->screen->context_create(This->screen, NULL, 0);
if (!This->pipe) { return E_OUTOFMEMORY; } /* guess */
@@ -2904,13 +2908,17 @@ HRESULT NINE_WINAPI
NineDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,
BOOL bSoftware )
{
- STUB(D3DERR_INVALIDCALL);
+ if (This->params.BehaviorFlags & D3DCREATE_MIXED_VERTEXPROCESSING) {
+ This->swvp = bSoftware;
+ return D3D_OK;
+ } else
+ return D3DERR_INVALIDCALL; /* msdn. TODO: check in practice */
}
BOOL NINE_WINAPI
NineDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This )
{
- return !!(This->params.BehaviorFlags & D3DCREATE_SOFTWARE_VERTEXPROCESSING);
+ return This->swvp;
}
HRESULT NINE_WINAPI
diff --git a/src/gallium/state_trackers/nine/device9.h b/src/gallium/state_trackers/nine/device9.h
index d584a3558ab..8eedfe132fe 100644
--- a/src/gallium/state_trackers/nine/device9.h
+++ b/src/gallium/state_trackers/nine/device9.h
@@ -144,6 +144,9 @@ struct NineDevice9
int minor_version_num;
long long available_texture_mem;
long long available_texture_limit;
+
+ /* software vertex processing */
+ boolean swvp;
};
static inline struct NineDevice9 *
NineDevice9( void *data )