d3d1x: add support for buffer views
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 13 Oct 2011 20:29:12 +0000 (22:29 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 21 Oct 2011 21:00:38 +0000 (23:00 +0200)
src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h

index 1ccb0204da242c8c66c38e38b7e9806e6886fddb..bed1dcb3383a968f2a459d07aee1f911a77b60f9 100644 (file)
@@ -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;