1a04b632350e5d0e9994fc667afc59407a39da0baEric Anholt 26b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell/************************************************************************** 36b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * 46b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas. 56b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * All Rights Reserved. 66b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * 76b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a 86b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * copy of this software and associated documentation files (the 96b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * "Software"), to deal in the Software without restriction, including 106b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * without limitation the rights to use, copy, modify, merge, publish, 116b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * distribute, sub license, and/or sell copies of the Software, and to 126b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * permit persons to whom the Software is furnished to do so, subject to 136b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * the following conditions: 146b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * 156b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * The above copyright notice and this permission notice (including the 166b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * next paragraph) shall be included in all copies or substantial portions 176b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * of the Software. 186b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * 196b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 206b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 216b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 226b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 236b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 246b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 256b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 266b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell * 276b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell **************************************************************************/ 286b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell 296b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell#ifndef INTEL_BUFFERS_H 306b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell#define INTEL_BUFFERS_H 316b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell 320cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholt#include "dri_util.h" 330cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholt#include "drm.h" 34f34ec6169dc8b96e3958a42b51c9048c5f42ed80Eric Anholt#include "intel_context.h" 356b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell 366b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellstruct intel_context; 376b99cafd69a791d03ce749d0fd2b9f59ca265677Michel Dänzerstruct intel_framebuffer; 386b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell 396b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellextern struct intel_region *intel_readbuf_region(struct intel_context *intel); 406b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell 416b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellextern struct intel_region *intel_drawbuf_region(struct intel_context *intel); 426b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell 43bcbfda71b03303d3f008a6f3cf8cb7d9667bf8d2Brian Paulextern void intel_check_front_buffer_rendering(struct intel_context *intel); 44bcbfda71b03303d3f008a6f3cf8cb7d9667bf8d2Brian Paul 45f34ec6169dc8b96e3958a42b51c9048c5f42ed80Eric Anholtstatic inline void 4617fa6772d7e223f940dd8ec4e4f6cf8cab9a03c7Ian Romanickintel_draw_buffer(struct gl_context * ctx) 47f34ec6169dc8b96e3958a42b51c9048c5f42ed80Eric Anholt{ 48f34ec6169dc8b96e3958a42b51c9048c5f42ed80Eric Anholt struct intel_context *intel = intel_context(ctx); 49f34ec6169dc8b96e3958a42b51c9048c5f42ed80Eric Anholt 50f34ec6169dc8b96e3958a42b51c9048c5f42ed80Eric Anholt intel->vtbl.update_draw_buffer(intel); 51f34ec6169dc8b96e3958a42b51c9048c5f42ed80Eric Anholt} 526b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell 536b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellextern void intelInitBufferFuncs(struct dd_function_table *functions); 54ac0dfbdf0f5e5dea08ec717ae8c4e1e141b15c05Eric Anholt#ifdef I915 55f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid intelCalcViewport(struct gl_context * ctx); 56ac0dfbdf0f5e5dea08ec717ae8c4e1e141b15c05Eric Anholt#endif 570cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholt 586b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell#endif /* INTEL_BUFFERS_H */ 59