19f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom/**********************************************************
29f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * Copyright 2009-2011 VMware, Inc. All rights reserved.
39f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom *
49f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * Permission is hereby granted, free of charge, to any person
59f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * obtaining a copy of this software and associated documentation
69f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * files (the "Software"), to deal in the Software without
79f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * restriction, including without limitation the rights to use, copy,
89f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * modify, merge, publish, distribute, sublicense, and/or sell copies
99f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * of the Software, and to permit persons to whom the Software is
109f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * furnished to do so, subject to the following conditions:
119f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom *
129f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * The above copyright notice and this permission notice shall be
139f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * included in all copies or substantial portions of the Software.
149f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom *
159f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
169f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
179f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
189f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
199f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
209f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
219f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
229f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * SOFTWARE.
239f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom *
249f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom *********************************************************
259f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * Authors:
269f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * Zack Rusin <zackr-at-vmware-dot-com>
279f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom * Thomas Hellstrom <thellstrom-at-vmware-dot-com>
289f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom */
299f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
309f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas HellstromThe XA state tracker is intended as a versioned interface to gallium for
319f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstromxorg driver writers. Initially it's mostly based on Zack Rusin's
329f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstromcomposite / video work for the Xorg state tracker.
339f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
349f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas HellstromThe motivation behind this state tracker is that the Xorg state tracker has
359f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstroma number of interfaces to work with:
369f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
379f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom1) The Xorg sdk (versioned)
389f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom2) Gallium3D (not versioned)
399f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom3) KMS modesetting (versioned)
409f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom4) Driver-private (hopefully versioned)
419f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
427ba80e0c509c0bf1b14c2a20db579055b999f066ThomasSince Gallium3D is not versioned, the Xorg state tracker needs to be compiled
439f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstromwith Gallium, but it's really beneficial to be able to compile xorg drivers
449f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstromstandalone.
459f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
469f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas HellstromTherefore the xa state tracker is intended to supply the following
479f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstromfunctionality:
489f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
499f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom1) Versioning.
509f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom2) Surface functionality (creation and copying for a basic dri2 implementation)
519f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom3) YUV blits for textured Xv.
5269140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstrom4) Solid fills without ROP functionality.
5369140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstrom5) Copies with format conversion and - reinterpretation but without ROP
549f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom6) Xrender- type compositing for general acceleration.
559f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
569f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
579f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas HellstromThe first user will be the vmwgfx xorg driver. When there are more users,
589f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstromwe need to be able to load the appropriate gallium pipe driver, and we
599f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstromshould investigate sharing the loadig mechanism with the EGL state tracker.
609f2f5b3d7fd70663b98da5d302fcdfd5bc93db05Thomas Hellstrom
6169140b719b401b5fbaa136a2b8728a3c3c053385Thomas HellstromIMPORTANT:
6269140b719b401b5fbaa136a2b8728a3c3c053385Thomas HellstromVersion compatibilities:
6369140b719b401b5fbaa136a2b8728a3c3c053385Thomas HellstromWhile this library remains OUTSIDE any mesa release branch,
6469140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstromand the major version number is still 0. Any minor bump should be viewed as
6569140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstroman incompatibility event, and any user of this library should test for that
6669140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstromand refuse to use the library if minor versions differ.
6769140b719b401b5fbaa136a2b8728a3c3c053385Thomas HellstromAs soon as the library enters a mesa release branch, if not earlier, major
6869140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstromwill be bumped to 1, and normal incompatibility rules (major bump)
6969140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstromwill be followed.
7069140b719b401b5fbaa136a2b8728a3c3c053385Thomas HellstromIt is allowed to add function interfaces while only bumping minor. Any
7169140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstromuser that uses these function interfaces must therefore use lazy symbol
7269140b719b401b5fbaa136a2b8728a3c3c053385Thomas Hellstromlookups and test minor for compatibility before using such a function.
73