14a49301eSmrg/************************************************************************** 27ec681f3Smrg * 3af69d88dSmrg * Copyright 2007 VMware, Inc. 44a49301eSmrg * All Rights Reserved. 57ec681f3Smrg * 64a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a 74a49301eSmrg * copy of this software and associated documentation files (the 84a49301eSmrg * "Software"), to deal in the Software without restriction, including 94a49301eSmrg * without limitation the rights to use, copy, modify, merge, publish, 104a49301eSmrg * distribute, sub license, and/or sell copies of the Software, and to 114a49301eSmrg * permit persons to whom the Software is furnished to do so, subject to 124a49301eSmrg * the following conditions: 137ec681f3Smrg * 144a49301eSmrg * The above copyright notice and this permission notice (including the 154a49301eSmrg * next paragraph) shall be included in all copies or substantial portions 164a49301eSmrg * of the Software. 177ec681f3Smrg * 184a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 194a49301eSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 204a49301eSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21af69d88dSmrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 224a49301eSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 234a49301eSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 244a49301eSmrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 257ec681f3Smrg * 264a49301eSmrg **************************************************************************/ 274a49301eSmrg 284a49301eSmrg#ifndef I915_BATCH_H 294a49301eSmrg#define I915_BATCH_H 304a49301eSmrg 313464ebd5Sriastradh#include "i915_batchbuffer.h" 323464ebd5Sriastradh#include "i915_context.h" 334a49301eSmrg 347ec681f3Smrg#define BEGIN_BATCH(dwords) (i915_winsys_batchbuffer_check(i915->batch, dwords)) 353464ebd5Sriastradh 367ec681f3Smrg#define OUT_BATCH(dword) i915_winsys_batchbuffer_dword(i915->batch, dword) 374a49301eSmrg 387ec681f3Smrg#define OUT_BATCH_F(f) i915_winsys_batchbuffer_float(i915->batch, f) 393464ebd5Sriastradh 407ec681f3Smrg#define OUT_RELOC(buf, usage, offset) \ 413464ebd5Sriastradh i915_winsys_batchbuffer_reloc(i915->batch, buf, usage, offset, false) 423464ebd5Sriastradh 437ec681f3Smrg#define OUT_RELOC_FENCED(buf, usage, offset) \ 443464ebd5Sriastradh i915_winsys_batchbuffer_reloc(i915->batch, buf, usage, offset, true) 453464ebd5Sriastradh 467ec681f3Smrg#define FLUSH_BATCH(fence, flags) i915_flush(i915, fence, flags) 473464ebd5Sriastradh 483464ebd5Sriastradh/************************************************************************ 493464ebd5Sriastradh * i915_flush.c 503464ebd5Sriastradh */ 51af69d88dSmrgextern void i915_flush(struct i915_context *i915, 527ec681f3Smrg struct pipe_fence_handle **fence, unsigned flags); 534a49301eSmrg 544a49301eSmrg#endif 55