1f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/*
2f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright (C) 2008 Nicolai Haehnle.
3f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
4f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * All Rights Reserved.
5f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
6f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Permission is hereby granted, free of charge, to any person obtaining
7f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * a copy of this software and associated documentation files (the
8f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * "Software"), to deal in the Software without restriction, including
9f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * without limitation the rights to use, copy, modify, merge, publish,
10f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * distribute, sublicense, and/or sell copies of the Software, and to
11f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * permit persons to whom the Software is furnished to do so, subject to
12f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * the following conditions:
13f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
14f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * The above copyright notice and this permission notice (including the
15f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * next paragraph) shall be included in all copies or substantial
16f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * portions of the Software.
17f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
18f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
22f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
26f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */
27f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
28f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#ifndef __RADEON_PROGRAM_H_
29f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define __RADEON_PROGRAM_H_
30f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
31f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include <stdint.h>
32f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include <string.h>
33f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
34f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "radeon_opcodes.h"
35f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "radeon_code.h"
36f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "radeon_program_constants.h"
37f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "radeon_program_pair.h"
38f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
39f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct radeon_compiler;
40f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
41f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_src_register {
42f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int File:4;
43f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
44f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/** Negative values may be used for relative addressing. */
45f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	signed int Index:(RC_REGISTER_INDEX_BITS+1);
46f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int RelAddr:1;
47f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
48f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int Swizzle:12;
49f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
50f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/** Take the component-wise absolute value */
51f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int Abs:1;
52f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
53f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/** Post-Abs negation. */
54f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int Negate:4;
55f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
56f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
57f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_dst_register {
58f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int File:3;
59f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int Index:RC_REGISTER_INDEX_BITS;
60f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int WriteMask:4;
61f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int Pred:2;
62f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
63f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
64f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_presub_instruction {
65f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	rc_presubtract_op Opcode;
66f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_src_register SrcReg[2];
67f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
68f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
69f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/**
70f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Instructions are maintained by the compiler in a doubly linked list
71f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * of these structures.
72f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
73f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * This instruction format is intended to be expanded for hardware-specific
74f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * trickery. At different stages of compilation, a different set of
75f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * instruction types may be valid.
76f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */
77f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_sub_instruction {
78f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_src_register SrcReg[3];
79f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_dst_register DstReg;
80f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
81f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**
82f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * Opcode of this instruction, according to \ref rc_opcode enums.
83f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 */
84f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int Opcode:8;
85f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
86f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**
87f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * Saturate each value of the result to the range [0,1] or [-1,1],
88f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * according to \ref rc_saturate_mode enums.
89f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 */
90f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int SaturateMode:2;
91f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
92f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**
93f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * Writing to the special register RC_SPECIAL_ALU_RESULT
94f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 */
95f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/*@{*/
96f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int WriteALUResult:2;
97f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int ALUResultCompare:3;
98f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/*@}*/
99f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
100f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**
101f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * \name Extra fields for TEX, TXB, TXD, TXL, TXP instructions.
102f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 */
103f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/*@{*/
104f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/** Source texture unit. */
105f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int TexSrcUnit:5;
106f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
107f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/** Source texture target, one of the \ref rc_texture_target enums */
108f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int TexSrcTarget:3;
109f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
110f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/** True if tex instruction should do shadow comparison */
111f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int TexShadow:1;
112f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
113f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**/
114f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int TexSemWait:1;
115f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int TexSemAcquire:1;
116f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
117f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**R500 Only.  How to swizzle the result of a TEX lookup*/
118f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int TexSwizzle:12;
119f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/*@}*/
120f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
121f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/** This holds information about the presubtract operation used by
122f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * this instruction. */
123f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_presub_instruction PreSub;
124f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
125f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	rc_omod_op Omod;
126f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
127f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
128f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgtypedef enum {
129f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	RC_INSTRUCTION_NORMAL = 0,
130f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	RC_INSTRUCTION_PAIR
131f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org} rc_instruction_type;
132f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
133f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_instruction {
134f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_instruction * Prev;
135f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_instruction * Next;
136f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
137f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	rc_instruction_type Type;
138f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	union {
139f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org		struct rc_sub_instruction I;
140f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org		struct rc_pair_instruction P;
141f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	} U;
142f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
143f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**
144f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * Warning: IPs are not stable. If you want to use them,
145f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * you need to recompute them at the beginning of each pass
146f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * using \ref rc_recompute_ips
147f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 */
148f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int IP;
149f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
150f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
151f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_program {
152f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/**
153f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * Instructions.Next points to the first instruction,
154f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * Instructions.Prev points to the last instruction.
155f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 */
156f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_instruction Instructions;
157f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
158f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	/* Long term, we should probably remove InputsRead & OutputsWritten,
159f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * since updating dependent state can be fragile, and they aren't
160f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	 * actually used very often. */
161f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	uint32_t InputsRead;
162f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	uint32_t OutputsWritten;
163f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	uint32_t ShadowSamplers; /**< Texture units used for shadow sampling. */
164f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
165f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct rc_constant_list Constants;
166f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
167f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
168f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/**
169f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * A transformation that can be passed to \ref rc_local_transform.
170f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
171f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * The function will be called once for each instruction.
172f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * It has to either emit the appropriate transformed code for the instruction
173f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * and return true, or return false if it doesn't understand the
174f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * instruction.
175f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
176f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * The function gets passed the userData as last parameter.
177f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */
178f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct radeon_program_transformation {
179f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	int (*function)(
180f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org		struct radeon_compiler*,
181f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org		struct rc_instruction*,
182f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org		void*);
183f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	void *userData;
184f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
185f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
186f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgvoid rc_local_transform(
187f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct radeon_compiler *c,
188f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	void *user);
189f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
190f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgvoid rc_get_used_temporaries(
191f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct radeon_compiler * c,
192f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned char * used,
193f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int used_length);
194f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
195f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgint rc_find_free_temporary_list(
196f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	struct radeon_compiler * c,
197f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned char * used,
198f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int used_length,
199f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org	unsigned int mask);
200f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
201f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgunsigned int rc_find_free_temporary(struct radeon_compiler * c);
202f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
203f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_instruction *rc_alloc_instruction(struct radeon_compiler * c);
204f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct rc_instruction *rc_insert_new_instruction(struct radeon_compiler * c, struct rc_instruction * after);
205f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgvoid rc_insert_instruction(struct rc_instruction * after, struct rc_instruction * inst);
206f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgvoid rc_remove_instruction(struct rc_instruction * inst);
207f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
208f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgunsigned int rc_recompute_ips(struct radeon_compiler * c);
209f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
210f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgvoid rc_print_program(const struct rc_program *prog);
211f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
212f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgrc_swizzle rc_mask_to_swizzle(unsigned int mask);
213f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#endif
214