summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-10-02 11:58:41 +0200
committerAxel Davy <[email protected]>2016-10-10 23:43:51 +0200
commit1f65f67b21821c00ebd9f1aa9f9f0b417b0a9677 (patch)
treed15c3891aa0b20e412b7cdcbc8b60247a1a31d3c /src/gallium
parent9dc792b95bb795fd924ee76c93245f39796ce862 (diff)
st/nine: Fix D3DFMT_NULL size
D3DFMT_NULL is mapped to PIPE_FORMAT_NONE. Instead of relying on PIPE_FORMAT_NONE to return a size, pick one. The one picked is the same than Wine. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/nine/nine_pipe.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/nine_pipe.h b/src/gallium/state_trackers/nine/nine_pipe.h
index 1b5a83cf30c..bbb148db66c 100644
--- a/src/gallium/state_trackers/nine/nine_pipe.h
+++ b/src/gallium/state_trackers/nine/nine_pipe.h
@@ -733,6 +733,8 @@ static inline unsigned nine_format_get_level_alloc_size(enum pipe_format format,
if (is_ATI1_ATI2(format)) {
/* For "unknown" formats like ATIx use width * height bytes */
size = w * h;
+ } else if (format == PIPE_FORMAT_NONE) { /* D3DFMT_NULL */
+ size = w * h * 4;
} else {
size = nine_format_get_stride(format, w) *
util_format_get_nblocksy(format, h);