summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_interp.c12
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_interp.h10
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c16
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_setup.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_tile_soa.h6
5 files changed, 24 insertions, 24 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
index 45ddf547bf0..0608ab0a2a7 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
@@ -143,10 +143,10 @@ coeffs_init(struct lp_build_interp_soa_context *bld,
for (attrib = 0; attrib < bld->num_attribs; ++attrib) {
const unsigned mask = bld->mask[attrib];
const unsigned interp = bld->interp[attrib];
- for (chan = 0; chan < NUM_CHANNELS; ++chan) {
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
if (mask & (1 << chan)) {
LLVMValueRef index = lp_build_const_int32(gallivm,
- attrib * NUM_CHANNELS + chan);
+ attrib * TGSI_NUM_CHANNELS + chan);
LLVMValueRef a0 = zero;
LLVMValueRef dadx = zero;
LLVMValueRef dady = zero;
@@ -292,7 +292,7 @@ attribs_update(struct lp_build_interp_soa_context *bld,
for(attrib = start; attrib < end; ++attrib) {
const unsigned mask = bld->mask[attrib];
const unsigned interp = bld->interp[attrib];
- for(chan = 0; chan < NUM_CHANNELS; ++chan) {
+ for(chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
if(mask & (1 << chan)) {
LLVMValueRef a;
if (interp == LP_INTERP_CONSTANT ||
@@ -418,7 +418,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
coeff_type.floating = TRUE;
coeff_type.sign = TRUE;
coeff_type.width = 32;
- coeff_type.length = QUAD_SIZE;
+ coeff_type.length = TGSI_QUAD_SIZE;
/* XXX: we don't support interpolating into any other types */
assert(memcmp(&coeff_type, &type, sizeof coeff_type) == 0);
@@ -427,7 +427,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
/* For convenience */
bld->pos = bld->attribs[0];
- bld->inputs = (const LLVMValueRef (*)[NUM_CHANNELS]) bld->attribs[1];
+ bld->inputs = (const LLVMValueRef (*)[TGSI_NUM_CHANNELS]) bld->attribs[1];
/* Position */
bld->num_attribs = 1;
@@ -443,7 +443,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
/* Ensure all masked out input channels have a valid value */
for (attrib = 0; attrib < bld->num_attribs; ++attrib) {
- for (chan = 0; chan < NUM_CHANNELS; ++chan) {
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
bld->attribs[attrib][chan] = bld->coeff_bld.undef;
}
}
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
index b58b2dc1155..5f72b0b8953 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
@@ -75,7 +75,7 @@ struct lp_shader_input {
struct lp_build_interp_soa_context
{
- /* QUAD_SIZE x float */
+ /* TGSI_QUAD_SIZE x float */
struct lp_build_context coeff_bld;
unsigned num_attribs;
@@ -85,18 +85,18 @@ struct lp_build_interp_soa_context
LLVMValueRef x;
LLVMValueRef y;
- LLVMValueRef a [1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];
- LLVMValueRef dadq[1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];
+ LLVMValueRef a [1 + PIPE_MAX_SHADER_INPUTS][TGSI_NUM_CHANNELS];
+ LLVMValueRef dadq[1 + PIPE_MAX_SHADER_INPUTS][TGSI_NUM_CHANNELS];
LLVMValueRef oow;
- LLVMValueRef attribs[1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];
+ LLVMValueRef attribs[1 + PIPE_MAX_SHADER_INPUTS][TGSI_NUM_CHANNELS];
/*
* Convenience pointers. Callers may access this one.
*/
const LLVMValueRef *pos;
- const LLVMValueRef (*inputs)[NUM_CHANNELS];
+ const LLVMValueRef (*inputs)[TGSI_NUM_CHANNELS];
};
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index c7bab82b088..482f4e38632 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -233,7 +233,7 @@ generate_fs(struct gallivm_state *gallivm,
const struct tgsi_token *tokens = shader->base.tokens;
LLVMTypeRef vec_type;
LLVMValueRef consts_ptr;
- LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][NUM_CHANNELS];
+ LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][TGSI_NUM_CHANNELS];
LLVMValueRef z;
LLVMValueRef zs_value = NULL;
LLVMValueRef stencil_refs[2];
@@ -289,7 +289,7 @@ generate_fs(struct gallivm_state *gallivm,
/* Declare the color and z variables */
for(cbuf = 0; cbuf < key->nr_cbufs; cbuf++) {
- for(chan = 0; chan < NUM_CHANNELS; ++chan) {
+ for(chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
color[cbuf][chan] = lp_build_alloca(gallivm, vec_type, "color");
}
}
@@ -406,7 +406,7 @@ generate_fs(struct gallivm_state *gallivm,
shader->info.base.output_semantic_index[attrib] < key->nr_cbufs)
{
unsigned cbuf = shader->info.base.output_semantic_index[attrib];
- for(chan = 0; chan < NUM_CHANNELS; ++chan) {
+ for(chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
if(outputs[attrib][chan]) {
/* XXX: just initialize outputs to point at colors[] and
* skip this.
@@ -536,7 +536,7 @@ generate_fragment(struct llvmpipe_context *lp,
struct lp_build_sampler_soa *sampler;
struct lp_build_interp_soa_context interp;
LLVMValueRef fs_mask[LP_MAX_VECTOR_LENGTH];
- LLVMValueRef fs_out_color[PIPE_MAX_COLOR_BUFS][NUM_CHANNELS][LP_MAX_VECTOR_LENGTH];
+ LLVMValueRef fs_out_color[PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS][LP_MAX_VECTOR_LENGTH];
LLVMValueRef blend_mask;
LLVMValueRef function;
LLVMValueRef facing;
@@ -684,7 +684,7 @@ generate_fragment(struct llvmpipe_context *lp,
LLVMValueRef depth_offset = LLVMConstInt(int32_type,
i*fs_type.length*zs_format_desc->block.bits/8,
0);
- LLVMValueRef out_color[PIPE_MAX_COLOR_BUFS][NUM_CHANNELS];
+ LLVMValueRef out_color[PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS];
LLVMValueRef depth_ptr_i;
depth_ptr_i = LLVMBuildGEP(builder, depth_ptr, &depth_offset, 1, "");
@@ -706,7 +706,7 @@ generate_fragment(struct llvmpipe_context *lp,
counter);
for (cbuf = 0; cbuf < key->nr_cbufs; cbuf++)
- for (chan = 0; chan < NUM_CHANNELS; ++chan)
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; ++chan)
fs_out_color[cbuf][chan][i] =
out_color[cbuf * !cbuf0_write_all][chan];
}
@@ -718,13 +718,13 @@ generate_fragment(struct llvmpipe_context *lp,
for(cbuf = 0; cbuf < key->nr_cbufs; cbuf++) {
LLVMValueRef color_ptr;
LLVMValueRef index = lp_build_const_int32(gallivm, cbuf);
- LLVMValueRef blend_in_color[NUM_CHANNELS];
+ LLVMValueRef blend_in_color[TGSI_NUM_CHANNELS];
unsigned rt;
/*
* Convert the fs's output color and mask to fit to the blending type.
*/
- for(chan = 0; chan < NUM_CHANNELS; ++chan) {
+ for(chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
LLVMValueRef fs_color_vals[LP_MAX_VECTOR_LENGTH];
for (i = 0; i < num_fs; i++) {
diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index 3243abff6e0..ab38357872d 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
@@ -911,7 +911,7 @@ lp_dump_setup_coef( const struct lp_setup_variant_key *key,
{
int i, slot;
- for (i = 0; i < NUM_CHANNELS; i++) {
+ for (i = 0; i < TGSI_NUM_CHANNELS; i++) {
float a0 = sa0 [0][i];
float dadx = sdadx[0][i];
float dady = sdady[0][i];
@@ -923,7 +923,7 @@ lp_dump_setup_coef( const struct lp_setup_variant_key *key,
for (slot = 0; slot < key->num_inputs; slot++) {
unsigned usage_mask = key->inputs[slot].usage_mask;
- for (i = 0; i < NUM_CHANNELS; i++) {
+ for (i = 0; i < TGSI_NUM_CHANNELS; i++) {
if (usage_mask & (1 << i)) {
float a0 = sa0 [1 + slot][i];
float dadx = sdadx[1 + slot][i];
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.h b/src/gallium/drivers/llvmpipe/lp_tile_soa.h
index 12dac1da6ca..6a5fc8dbfc9 100644
--- a/src/gallium/drivers/llvmpipe/lp_tile_soa.h
+++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.h
@@ -29,7 +29,7 @@
#define LP_TILE_SOA_H
#include "pipe/p_compiler.h"
-#include "tgsi/tgsi_exec.h" /* for NUM_CHANNELS */
+#include "tgsi/tgsi_exec.h" /* for TGSI_NUM_CHANNELS */
#include "lp_limits.h"
#ifdef __cplusplus
@@ -47,8 +47,8 @@ extern const unsigned char
tile_offset[TILE_VECTOR_HEIGHT][TILE_VECTOR_WIDTH];
#define TILE_C_STRIDE (TILE_VECTOR_HEIGHT * TILE_VECTOR_WIDTH) //16
-#define TILE_X_STRIDE (NUM_CHANNELS * TILE_C_STRIDE) //64
-#define TILE_Y_STRIDE (TILE_VECTOR_HEIGHT * TILE_SIZE * NUM_CHANNELS) //1024
+#define TILE_X_STRIDE (TGSI_NUM_CHANNELS * TILE_C_STRIDE) //64
+#define TILE_Y_STRIDE (TILE_VECTOR_HEIGHT * TILE_SIZE * TGSI_NUM_CHANNELS) //1024
#ifdef DEBUG