diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2022-06-14 17:11:34 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-30 23:46:35 +0000 |
commit | 0ce9d7b7c9d674d12afdfba51cca2a7dac2e40ab (patch) | |
tree | 4722e834c9b941641773d3dae9063abe7944c399 /src | |
parent | 90c5eea22b69306e463decd405029944b4a0d53b (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_query.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index 49201d560da..1af861ca7a3 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -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; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index f95339f2a5b..8ca683bba81 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -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; |