From: Christoph Bumiller Date: Thu, 13 Oct 2011 20:29:12 +0000 (+0200) Subject: d3d1x: add support for buffer views X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=74ff845e336ed0ccd6884aa072a19ac7ce7dd0a2;p=mesa.git d3d1x: add support for buffer views --- diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h index 1ccb0204da2..bed1dcb3383 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h @@ -1112,6 +1112,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen assert(templat.u.tex.last_level >= templat.u.tex.first_level); break; case D3D11_SRV_DIMENSION_BUFFER: + templat.u.buf.first_element = desc->Buffer.ElementOffset; + templat.u.buf.last_element = desc->Buffer.ElementOffset + desc->Buffer.ElementWidth - 1; + break; case D3D11_SRV_DIMENSION_TEXTURE2DMS: case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: return E_NOTIMPL; @@ -1221,6 +1224,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen templat.u.tex.last_layer = desc->Texture1DArray.FirstArraySlice + desc->Texture1DArray.ArraySize - 1; break; case D3D11_RTV_DIMENSION_BUFFER: + templat.u.buf.first_element = desc->Buffer.ElementOffset; + templat.u.buf.last_element = desc->Buffer.ElementOffset + desc->Buffer.ElementWidth - 1; + break; case D3D11_RTV_DIMENSION_TEXTURE2DMS: case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: return E_NOTIMPL;