summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-02-09 23:51:39 +0100
committerAxel Davy <[email protected]>2016-05-18 23:37:14 +0200
commit7fc8391d235e96b66abaa9944241a6935b256023 (patch)
tree34ce47ccc02959f12f7eea685d573c087052bfb8 /src/gallium/state_trackers/nine/device9.c
parentd11d913987acdec3e9ced0fcc0b77a574ab90931 (diff)
st/nine: Add ColorFill test for compressed textures
ColorFill should contain alignment checks for compressed textures. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 3e00ceed424..279b8352b96 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -1732,6 +1732,14 @@ NineDevice9_ColorFill( struct NineDevice9 *This,
y = pRect->top;
w = pRect->right - pRect->left;
h = pRect->bottom - pRect->top;
+ /* Wine tests: */
+ if (compressed_format(surf->desc.Format)) {
+ const unsigned bw = util_format_get_blockwidth(surf->base.info.format);
+ const unsigned bh = util_format_get_blockheight(surf->base.info.format);
+
+ user_assert(!(x % bw) && !(y % bh) && !(w % bw) && !(h % bh),
+ D3DERR_INVALIDCALL);
+ }
} else{
x = 0;
y = 0;