i915_batch.h revision 01c35b52a1fccbe4253a96b9c0506ef6c991e44f
101c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell/************************************************************************** 201c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * 301c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. 401c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * All Rights Reserved. 501c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * 601c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a 701c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * copy of this software and associated documentation files (the 801c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * "Software"), to deal in the Software without restriction, including 901c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * without limitation the rights to use, copy, modify, merge, publish, 1001c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * distribute, sub license, and/or sell copies of the Software, and to 1101c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * permit persons to whom the Software is furnished to do so, subject to 1201c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * the following conditions: 1301c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * 1401c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * The above copyright notice and this permission notice (including the 1501c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * next paragraph) shall be included in all copies or substantial portions 1601c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * of the Software. 1701c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * 1801c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1901c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2001c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 2101c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 2201c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 2301c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 2401c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2501c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell * 2601c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell **************************************************************************/ 2701c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell 2801c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#ifndef I915_BATCH_H 2901c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#define I915_BATCH_H 3001c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell 3101c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#define BATCH_LOCALS 3201c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell 3301c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#define BEGIN_BATCH( dwords, relocs ) \ 3401c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell i915->winsys->batch_start( i915->winsys, dwords, relocs ) 3501c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell 3601c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#define OUT_BATCH( dword ) \ 3701c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell i915->winsys->batch_dword( i915->winsys, dword ) 3801c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell 3901c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#define OUT_RELOC( buf, flags, delta ) \ 4001c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell i915->winsys->batch_reloc( i915->winsys, buf, flags, delta ) 4101c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell 4201c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#define ADVANCE_BATCH() 4301c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell 4401c35b52a1fccbe4253a96b9c0506ef6c991e44fKeith Whitwell#endif 45