diff options
author | Marek Olšák <[email protected]> | 2015-02-24 23:15:59 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-03-11 18:14:38 +0000 |
commit | c898d5c931ff9a19da93f2cc700bb92e02f60cfa (patch) | |
tree | a370ea19b47a91d82f8df5395a5ba35800d1eb12 /src/gallium/drivers | |
parent | 32a7f119dc0e65574adfc56600d68dc79ec0c840 (diff) |
r300g: fix a crash when resolving into an sRGB texture
Cc: 10.5 10.4 <[email protected]>
(cherry picked from commit 9953586af2254f83a610d4cd284f52f37fa18b98)
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index e85a818a33a..6c01c0d21e4 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -938,14 +938,16 @@ static void r300_texture_setup_fb_state(struct r300_surface *surf) surf->pitch_zmask = tex->tex.zmask_stride_in_pixels[level]; surf->pitch_hiz = tex->tex.hiz_stride_in_pixels[level]; } else { + enum pipe_format format = util_format_linear(surf->base.format); + surf->pitch = stride | - r300_translate_colorformat(surf->base.format) | + r300_translate_colorformat(format) | R300_COLOR_TILE(tex->tex.macrotile[level]) | R300_COLOR_MICROTILE(tex->tex.microtile); - surf->format = r300_translate_out_fmt(surf->base.format); + surf->format = r300_translate_out_fmt(format); surf->colormask_swizzle = - r300_translate_colormask_swizzle(surf->base.format); + r300_translate_colormask_swizzle(format); surf->pitch_cmask = tex->tex.cmask_stride_in_pixels; } } |