diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2015-01-28 13:29:48 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-02-04 17:58:10 -0700 |
| commit | 37c0b4e6c816422accb064fe0b92702eab199831 (patch) | |
| tree | 43b0745a6fcf18bdfbc6d391f2b908159dc1f467 | |
| parent | 1910b106e5576f4da8e1eadfbd42cf0a21753ee7 (diff) | |
| download | usermoji-37c0b4e6c816422accb064fe0b92702eab199831.tar.xz | |
xgl: Add fast clear APIs
Added new APIs for optimized clears of color and depth buffers.
Bug# 13172, due to a bug in rev39, this also accounts for the change
in rev41.
| -rw-r--r-- | include/xgl.h | 10 | ||||
| -rw-r--r-- | include/xglLayer.h | 2 | ||||
| -rw-r--r-- | xgl.py | 8 |
3 files changed, 20 insertions, 0 deletions
diff --git a/include/xgl.h b/include/xgl.h index 95a3fc51..7975e2c0 100644 --- a/include/xgl.h +++ b/include/xgl.h @@ -2284,6 +2284,8 @@ typedef XGL_RESULT (XGLAPI *xglGetFormatInfoType)(XGL_DEVICE device, XGL_FORMAT typedef XGL_RESULT (XGLAPI *xglCreateBufferType)(XGL_DEVICE device, const XGL_BUFFER_CREATE_INFO* pCreateInfo, XGL_BUFFER* pBuffer); typedef XGL_RESULT (XGLAPI *xglCreateBufferViewType)(XGL_DEVICE device, const XGL_BUFFER_VIEW_CREATE_INFO* pCreateInfo, XGL_BUFFER_VIEW* pView); typedef XGL_RESULT (XGLAPI *xglCreateImageType)(XGL_DEVICE device, const XGL_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage); +typedef XGL_RESULT (XGLAPI *xglSetFastClearColorType)(XGL_IMAGE image, const float color[4]); +typedef XGL_RESULT (XGLAPI *xglSetFastClearDepthType)(XGL_IMAGE image, float depth); typedef XGL_RESULT (XGLAPI *xglGetImageSubresourceInfoType)(XGL_IMAGE image, const XGL_IMAGE_SUBRESOURCE* pSubresource, XGL_SUBRESOURCE_INFO_TYPE infoType, XGL_SIZE* pDataSize, XGL_VOID* pData); typedef XGL_RESULT (XGLAPI *xglCreateImageViewType)(XGL_DEVICE device, const XGL_IMAGE_VIEW_CREATE_INFO* pCreateInfo, XGL_IMAGE_VIEW* pView); typedef XGL_RESULT (XGLAPI *xglCreateColorAttachmentViewType)(XGL_DEVICE device, const XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO* pCreateInfo, XGL_COLOR_ATTACHMENT_VIEW* pView); @@ -2601,6 +2603,14 @@ XGL_RESULT XGLAPI xglCreateImage( const XGL_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage); +XGL_RESULT XGLAPI xglSetFastClearColor( + XGL_IMAGE image, + const float color[4]); + +XGL_RESULT XGLAPI xglSetFastClearDepth( + XGL_IMAGE image, + float depth); + XGL_RESULT XGLAPI xglGetImageSubresourceInfo( XGL_IMAGE image, const XGL_IMAGE_SUBRESOURCE* pSubresource, diff --git a/include/xglLayer.h b/include/xglLayer.h index 7148fa42..195de53a 100644 --- a/include/xglLayer.h +++ b/include/xglLayer.h @@ -69,6 +69,8 @@ typedef struct _XGL_LAYER_DISPATCH_TABLE xglCreateBufferType CreateBuffer; xglCreateBufferViewType CreateBufferView; xglCreateImageType CreateImage; + xglSetFastClearColorType SetFastClearColor; + xglSetFastClearDepthType SetFastClearDepth; xglGetImageSubresourceInfoType GetImageSubresourceInfo; xglCreateImageViewType CreateImageView; xglCreateColorAttachmentViewType CreateColorAttachmentView; @@ -436,6 +436,14 @@ core = Extension( Param("const XGL_IMAGE_CREATE_INFO*", "pCreateInfo"), Param("XGL_IMAGE*", "pImage")]), + Proto("XGL_RESULT", "SetFastClearColor", + [Param("XGL_IMAGE", "pImage"), + Param("const XGL_FLOAT[4]", "color")]), + + Proto("XGL_RESULT", "SetFastClearDepth", + [Param("XGL_IMAGE", "pImage"), + Param("XGL_FLOAT", "depth")]), + Proto("XGL_RESULT", "GetImageSubresourceInfo", [Param("XGL_IMAGE", "image"), Param("const XGL_IMAGE_SUBRESOURCE*", "pSubresource"), |
