summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_emulate.h
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-10-04 00:02:31 +0200
committerMarek Olšák <marek.olsak@amd.com>2015-10-09 22:02:18 +0200
commit417927ebded4c6f4cee20c7e07a69c666a3f17a8 (patch)
tree8780bb6062a898e5696117004b68f83375718dc6 /src/gallium/auxiliary/tgsi/tgsi_emulate.h
parent9ea2a86809577cac5006a2bc4fad29fed9cb3ccc (diff)
downloadexternal_mesa3d-417927ebded4c6f4cee20c7e07a69c666a3f17a8.zip
external_mesa3d-417927ebded4c6f4cee20c7e07a69c666a3f17a8.tar.gz
external_mesa3d-417927ebded4c6f4cee20c7e07a69c666a3f17a8.tar.bz2
tgsi: add a utility for emulating some GL features
st/mesa will use this, but drivers can use it too. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_emulate.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_emulate.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_emulate.h b/src/gallium/auxiliary/tgsi/tgsi_emulate.h
new file mode 100644
index 0000000..425cec7
--- /dev/null
+++ b/src/gallium/auxiliary/tgsi/tgsi_emulate.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifndef TGSI_GL_EMULATION_H_
+#define TGSI_GL_EMULATION_H_
+
+#include "pipe/p_shader_tokens.h"
+
+#define TGSI_EMU_CLAMP_COLOR_OUTPUTS (1 << 0)
+#define TGSI_EMU_PASSTHROUGH_EDGEFLAG (1 << 1)
+#define TGSI_EMU_FORCE_PERSAMPLE_INTERP (1 << 2)
+
+const struct tgsi_token *
+tgsi_emulate(const struct tgsi_token *tokens, unsigned flags);
+
+#endif /* TGSI_GL_EMULATION_H_ */