diff options
author | Patrick Rudolph <siro@das-labor.org> | 2015-05-13 07:19:11 +0200 |
---|---|---|
committer | Axel Davy <axel.davy@ens.fr> | 2015-08-21 22:21:46 +0200 |
commit | 74a77a4c1a5dafccbad0ff8c7fb55156c6643685 (patch) | |
tree | 32b98c25d22755d515a7d9ddf5eb91c22bf6f093 | |
parent | 40a8943f53ff42f2a3b782e42d8a79711d814ab8 (diff) |
st/nine: Fix resource SetPriority/GetPriority
Return 0 for non MANAGED textures and surfaces.
Fixes failing wine d3d9 tests device.c test_resource_priority.
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
-rw-r--r-- | src/gallium/state_trackers/nine/resource9.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/resource9.c b/src/gallium/state_trackers/nine/resource9.c index b6a13e1130..6d915338b2 100644 --- a/src/gallium/state_trackers/nine/resource9.c +++ b/src/gallium/state_trackers/nine/resource9.c @@ -208,10 +208,13 @@ DWORD WINAPI NineResource9_SetPriority( struct NineResource9 *This, DWORD PriorityNew ) { - DWORD prev = This->priority; - + DWORD prev; DBG("This=%p, PriorityNew=%d\n", This, PriorityNew); + if (This->pool != D3DPOOL_MANAGED || This->type == D3DRTYPE_SURFACE) + return 0; + + prev = This->priority; This->priority = PriorityNew; return prev; } @@ -219,6 +222,9 @@ NineResource9_SetPriority( struct NineResource9 *This, DWORD WINAPI NineResource9_GetPriority( struct NineResource9 *This ) { + if (This->pool != D3DPOOL_MANAGED || This->type == D3DRTYPE_SURFACE) + return 0; + return This->priority; } |