intel_buffers.h revision f9995b30756140724f41daf963fa06167912be7f
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"
346b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell
356b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellstruct intel_context;
366b99cafd69a791d03ce749d0fd2b9f59ca265677Michel Dänzerstruct intel_framebuffer;
376b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell
386b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellextern struct intel_region *intel_readbuf_region(struct intel_context *intel);
396b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell
406b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellextern struct intel_region *intel_drawbuf_region(struct intel_context *intel);
416b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell
42bcbfda71b03303d3f008a6f3cf8cb7d9667bf8d2Brian Paulextern void intel_check_front_buffer_rendering(struct intel_context *intel);
43bcbfda71b03303d3f008a6f3cf8cb7d9667bf8d2Brian Paul
44f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergextern void intel_draw_buffer(struct gl_context * ctx, struct gl_framebuffer *fb);
456b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell
466b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwellextern void intelInitBufferFuncs(struct dd_function_table *functions);
476b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell
480cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholtvoid intel_get_cliprects(struct intel_context *intel,
490cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholt			 struct drm_clip_rect **cliprects,
500cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholt			 unsigned int *num_cliprects,
510cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholt			 int *x_off, int *y_off);
52ac0dfbdf0f5e5dea08ec717ae8c4e1e141b15c05Eric Anholt#ifdef I915
53f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid intelCalcViewport(struct gl_context * ctx);
54ac0dfbdf0f5e5dea08ec717ae8c4e1e141b15c05Eric Anholt#endif
550cade4de4f74f6b0e86fb6622e2fc370c73fd840Eric Anholt
566b9e31f3eb3dbe20cbc8493b963bbc6530e392c6Keith Whitwell#endif /* INTEL_BUFFERS_H */
57