diff options
author | Benjamin Franzke <[email protected]> | 2011-02-04 11:59:12 +0100 |
---|---|---|
committer | Benjamin Franzke <[email protected]> | 2011-02-07 13:52:28 +0100 |
commit | 1b8ef9416bf3a4d2d47fcf9935063af57da2975d (patch) | |
tree | acd062e00a9107e6a77fde576612e599359fcc81 /src/mesa/drivers/dri/common/dri_util.c | |
parent | a22bda9f80070393581c6ac512c03aa3144577ef (diff) |
Add dri2::{Allocate,Release}Buffer extension
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.c')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index bf8cf6eec07..82638fa7207 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -481,6 +481,22 @@ dri2CreateNewDrawable(__DRIscreen *screen, return pdraw; } +static __DRIbuffer * +dri2AllocateBuffer(__DRIscreen *screen, + unsigned int attachment, unsigned int format, + int width, int height) +{ + return (*screen->DriverAPI.AllocateBuffer)(screen, attachment, format, + width, height); +} + +static void +dri2ReleaseBuffer(__DRIscreen *screen, __DRIbuffer *buffer) +{ + (*screen->DriverAPI.ReleaseBuffer)(screen, buffer); +} + + static int dri2ConfigQueryb(__DRIscreen *screen, const char *var, GLboolean *val) { @@ -930,7 +946,9 @@ const __DRIdri2Extension driDRI2Extension = { dri2CreateNewDrawable, dri2CreateNewContext, dri2GetAPIMask, - dri2CreateNewContextForAPI + dri2CreateNewContextForAPI, + dri2AllocateBuffer, + dri2ReleaseBuffer }; const __DRI2configQueryExtension dri2ConfigQueryExtension = { |