diff options
author | Christoph Bumiller <[email protected]> | 2011-10-13 14:22:37 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-10-21 23:00:37 +0200 |
commit | dac5baf2e4702fabe627adc5b30e537560e8980d (patch) | |
tree | df03ead71a402433103bf278c1dd866aa42887e4 | |
parent | 5d70b5d10b30ffb715f54f870df6e6eb04acdf45 (diff) |
d3d1x: MipLevels -1 in resource view desc means all
-rw-r--r-- | src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h index 74ad24cf4c3..899ccc7364b 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h @@ -1027,7 +1027,11 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen case D3D11_SRV_DIMENSION_TEXTURECUBE: // yes, this works for all of these types templat.u.tex.first_level = desc->Texture1D.MostDetailedMip; - templat.u.tex.last_level = templat.u.tex.first_level + desc->Texture1D.MipLevels - 1; + if(desc->Texture1D.MipLevels == (unsigned)-1) + templat.u.tex.last_level = templat.texture->last_level; + else + templat.u.tex.last_level = templat.u.tex.first_level + desc->Texture1D.MipLevels - 1; + assert(templat.u.tex.last_level >= templat.u.tex.first_level); break; case D3D11_SRV_DIMENSION_BUFFER: case D3D11_SRV_DIMENSION_TEXTURE2DMS: |