iris: Use PIPE_* defines rather than ones from main/config.h

Gallium drivers shouldn't be including src/mesa/main headers, but we're
picking up a rogue main/config.h via the compiler, so this code I ported
over from i965 kept compiling.  Use the PIPE_* defines instead so that
we can stop including that.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17309>
This commit is contained in:
Kenneth Graunke
2022-06-14 17:11:34 -07:00
committed by Marge Bot
parent 90c5eea22b
commit 0ce9d7b7c9
2 changed files with 10 additions and 10 deletions

View File

@@ -310,7 +310,7 @@ calculate_result_on_cpu(const struct intel_device_info *devinfo,
break;
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
q->result = false;
for (int i = 0; i < MAX_VERTEX_STREAMS; i++)
for (int i = 0; i < PIPE_MAX_VERTEX_STREAMS; i++)
q->result |= stream_overflowed((void *) q->map, i);
break;
case PIPE_QUERY_PIPELINE_STATISTICS_SINGLE:
@@ -356,12 +356,12 @@ calc_overflow_for_stream(struct mi_builder *b,
static struct mi_value
calc_overflow_any_stream(struct mi_builder *b, struct iris_query *q)
{
struct mi_value stream_result[MAX_VERTEX_STREAMS];
for (int i = 0; i < MAX_VERTEX_STREAMS; i++)
struct mi_value stream_result[PIPE_MAX_VERTEX_STREAMS];
for (int i = 0; i < PIPE_MAX_VERTEX_STREAMS; i++)
stream_result[i] = calc_overflow_for_stream(b, q, i);
struct mi_value result = stream_result[0];
for (int i = 1; i < MAX_VERTEX_STREAMS; i++)
for (int i = 1; i < PIPE_MAX_VERTEX_STREAMS; i++)
result = mi_ior(b, result, stream_result[i]);
return result;

View File

@@ -3966,12 +3966,12 @@ static uint32_t *
iris_create_so_decl_list(const struct pipe_stream_output_info *info,
const struct brw_vue_map *vue_map)
{
struct GENX(SO_DECL) so_decl[MAX_VERTEX_STREAMS][128];
int buffer_mask[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
int next_offset[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
int decls[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
struct GENX(SO_DECL) so_decl[PIPE_MAX_VERTEX_STREAMS][128];
int buffer_mask[PIPE_MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
int next_offset[PIPE_MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
int decls[PIPE_MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
int max_decls = 0;
STATIC_ASSERT(ARRAY_SIZE(so_decl[0]) >= MAX_PROGRAM_OUTPUTS);
STATIC_ASSERT(ARRAY_SIZE(so_decl[0]) >= PIPE_MAX_SO_OUTPUTS);
memset(so_decl, 0, sizeof(so_decl));
@@ -3983,7 +3983,7 @@ iris_create_so_decl_list(const struct pipe_stream_output_info *info,
const int buffer = output->output_buffer;
const int varying = output->register_index;
const unsigned stream_id = output->stream;
assert(stream_id < MAX_VERTEX_STREAMS);
assert(stream_id < PIPE_MAX_VERTEX_STREAMS);
buffer_mask[stream_id] |= 1 << buffer;