diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2012-11-20 11:08:08 +0000 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2012-11-20 11:08:08 +0000 |
commit | eb216e6bd676535a5668bf8c389433c657f51aad (patch) | |
tree | a5bc595581c072c7e1af8346e53cc59ef0699413 /specs/d3d11.py | |
parent | 5f4b6e3f32b4e4077a647276a769d4982a023fef (diff) |
specs: Initial attempt to support unions.
Diffstat (limited to 'specs/d3d11.py')
-rw-r--r-- | specs/d3d11.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/specs/d3d11.py b/specs/d3d11.py index 8ee25f22..6592bcbf 100644 --- a/specs/d3d11.py +++ b/specs/d3d11.py @@ -677,15 +677,15 @@ D3D11_TEX3D_RTV = Struct("D3D11_TEX3D_RTV", [ D3D11_RENDER_TARGET_VIEW_DESC = Struct("D3D11_RENDER_TARGET_VIEW_DESC", [ (DXGI_FORMAT, "Format"), (D3D11_RTV_DIMENSION, "ViewDimension"), - (Union(None, [ - (D3D11_BUFFER_RTV, "Buffer"), - (D3D11_TEX1D_RTV, "Texture1D"), - (D3D11_TEX1D_ARRAY_RTV, "Texture1DArray"), - (D3D11_TEX2D_RTV, "Texture2D"), - (D3D11_TEX2D_ARRAY_RTV, "Texture2DArray"), - (D3D11_TEX2DMS_RTV, "Texture2DMS"), - (D3D11_TEX2DMS_ARRAY_RTV, "Texture2DMSArray"), - (D3D11_TEX3D_RTV, "Texture3D"), + (Union_("{self}.ViewDimension", [ + ("D3D11_RTV_DIMENSION_BUFFER", D3D11_BUFFER_RTV, "Buffer"), + ("D3D11_RTV_DIMENSION_TEXTURE1D", D3D11_TEX1D_RTV, "Texture1D"), + ("D3D11_RTV_DIMENSION_TEXTURE1DARRAY", D3D11_TEX1D_ARRAY_RTV, "Texture1DArray"), + ("D3D11_RTV_DIMENSION_TEXTURE2D", D3D11_TEX2D_RTV, "Texture2D"), + ("D3D11_RTV_DIMENSION_TEXTURE2DARRAY", D3D11_TEX2D_ARRAY_RTV, "Texture2DArray"), + ("D3D11_RTV_DIMENSION_TEXTURE2DMS", D3D11_TEX2DMS_RTV, "Texture2DMS"), + ("D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY", D3D11_TEX2DMS_ARRAY_RTV, "Texture2DMSArray"), + ("D3D11_RTV_DIMENSION_TEXTURE3D", D3D11_TEX3D_RTV, "Texture3D"), ]), None), ]) |