/**************************************************************************
*
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
uint chan_index;
float lodBias;
- // printf("Sampler %u unit %u\n", sampler, unit);
+ /* printf("Sampler %u unit %u\n", sampler, unit); */
switch (inst->InstructionExtTexture.Texture) {
case TGSI_TEXTURE_1D:
for( i = 0; i < QUAD_SIZE; i++ ) {
const float x = mach->Inputs[0].xyzw[0].f[i];
const float y = mach->Inputs[0].xyzw[1].f[i];
- // WPOS.w here is really 1/w
+ /* WPOS.w here is really 1/w */
const float w = 1.0f / mach->Inputs[0].xyzw[3].f[i];
assert(mach->Inputs[0].xyzw[3].f[i] != 0.0);
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ *
+ **************************************************************************/
+
#if !defined TGSI_EXEC_H
#define TGSI_EXEC_H
#if defined __cplusplus
extern "C" {
-#endif // defined __cplusplus
+#endif
#define NUM_CHANNELS 4 /* R,G,B,A */
#define QUAD_SIZE 4 /* 4 pixel/quad */
+/**
+ * Registers may be treated as float, signed int or unsigned int.
+ */
union tgsi_exec_channel
{
float f[QUAD_SIZE];
unsigned u[QUAD_SIZE];
};
+/**
+ * A vector[RGBA] of channels[4 pixels]
+ */
struct tgsi_exec_vector
{
union tgsi_exec_channel xyzw[NUM_CHANNELS];
};
+/**
+ * For fragment programs, information for computing fragment input
+ * values from plane equation of the triangle/line.
+ */
struct tgsi_interp_coef
{
float a0[NUM_CHANNELS]; /* in an xyzw layout */
struct softpipe_tile_cache; /**< Opaque to TGSI */
+/**
+ * Information for sampling textures, which must be implemented
+ * by code outside the TGSI executor.
+ */
struct tgsi_sampler
{
const struct pipe_sampler_state *state;
struct softpipe_tile_cache *cache;
};
+/**
+ * For branching/calling subroutines.
+ */
struct tgsi_exec_labels
{
unsigned labels[128][2];
struct tgsi_exec_machine *mach );
#if defined __cplusplus
-} // extern "C"
-#endif // defined __cplusplus
-
-#endif // !defined TGSI_EXEC_H
+} /* extern "C" */
+#endif
+#endif /* TGSI_EXEC_H */