projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r300: Silence 'mixed declarations and code' warning.
[mesa.git]
/
src
/
mesa
/
drivers
/
dri
/
r300
/
compiler
/
radeon_code.c
diff --git
a/src/mesa/drivers/dri/r300/compiler/radeon_code.c
b/src/mesa/drivers/dri/r300/compiler/radeon_code.c
index c7923004df9f1e67f233bddc52830b698a0b182c..853b2becd1b6b63d070e109e21b4423fdb3f1592 100644
(file)
--- a/
src/mesa/drivers/dri/r300/compiler/radeon_code.c
+++ b/
src/mesa/drivers/dri/r300/compiler/radeon_code.c
@@
-25,11
+25,13
@@
*
*/
*
*/
-#include "main/mtypes.h"
-#include "shader/prog_instruction.h"
-
#include "radeon_code.h"
#include "radeon_code.h"
+#include <stdlib.h>
+#include <string.h>
+
+#include "radeon_program.h"
+
void rc_constants_init(struct rc_constant_list * c)
{
memset(c, 0, sizeof(*c));
void rc_constants_init(struct rc_constant_list * c)
{
memset(c, 0, sizeof(*c));
@@
-141,9
+143,10
@@
unsigned rc_constants_add_immediate_scalar(struct rc_constant_list * c, float da
for(index = 0; index < c->Count; ++index) {
if (c->Constants[index].Type == RC_CONSTANT_IMMEDIATE) {
for(index = 0; index < c->Count; ++index) {
if (c->Constants[index].Type == RC_CONSTANT_IMMEDIATE) {
- for(unsigned comp = 0; comp < c->Constants[index].Size; ++comp) {
+ unsigned comp;
+ for(comp = 0; comp < c->Constants[index].Size; ++comp) {
if (c->Constants[index].u.Immediate[comp] == data) {
if (c->Constants[index].u.Immediate[comp] == data) {
- *swizzle =
MAKE_SWIZZLE4
(comp, comp, comp, comp);
+ *swizzle =
RC_MAKE_SWIZZLE
(comp, comp, comp, comp);
return index;
}
}
return index;
}
}
@@
-156,7
+159,7
@@
unsigned rc_constants_add_immediate_scalar(struct rc_constant_list * c, float da
if (free_index >= 0) {
unsigned comp = c->Constants[free_index].Size++;
c->Constants[free_index].u.Immediate[comp] = data;
if (free_index >= 0) {
unsigned comp = c->Constants[free_index].Size++;
c->Constants[free_index].u.Immediate[comp] = data;
- *swizzle =
MAKE_SWIZZLE4
(comp, comp, comp, comp);
+ *swizzle =
RC_MAKE_SWIZZLE
(comp, comp, comp, comp);
return free_index;
}
return free_index;
}
@@
-164,7
+167,7
@@
unsigned rc_constants_add_immediate_scalar(struct rc_constant_list * c, float da
constant.Type = RC_CONSTANT_IMMEDIATE;
constant.Size = 1;
constant.u.Immediate[0] = data;
constant.Type = RC_CONSTANT_IMMEDIATE;
constant.Size = 1;
constant.u.Immediate[0] = data;
- *swizzle = SWIZZLE_XXXX;
+ *swizzle =
RC_
SWIZZLE_XXXX;
return rc_constants_add(c, &constant);
}
return rc_constants_add(c, &constant);
}