From 37c0b4e6c816422accb064fe0b92702eab199831 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Wed, 28 Jan 2015 13:29:48 -0600 Subject: 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. --- include/xgl.h | 10 ++++++++++ include/xglLayer.h | 2 ++ 2 files changed, 12 insertions(+) (limited to 'include') 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; -- cgit v1.2.3