Commit 28f1f6fe authored by Jesse Natalie's avatar Jesse Natalie Committed by Marge Bot

d3d12: Signed/unsigned comparison warning fixes

Missed these last time through, not sure how. I couldn't find a
reason for the nested loop in d3d12_enable_fake_so_buffers to go
backwards, which would require signed, so I switched it to forward.
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Part-of: <mesa/mesa!8248>
parent 7319cabf
......@@ -740,7 +740,7 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx,
}
}
for (int i = 0; i < sel_ctx->ctx->num_samplers[stage]; ++i) {
for (unsigned i = 0; i < sel_ctx->ctx->num_samplers[stage]; ++i) {
if (!sel_ctx->ctx->samplers[stage][i] ||
sel_ctx->ctx->samplers[stage][i]->filter == PIPE_TEX_FILTER_NEAREST)
continue;
......@@ -1113,7 +1113,7 @@ d3d12_select_shader_variants(struct d3d12_context *ctx, const struct pipe_draw_i
validate_geometry_shader_variant(&sel_ctx);
for (int i = 0; i < ARRAY_SIZE(order); ++i) {
for (unsigned i = 0; i < ARRAY_SIZE(order); ++i) {
auto sel = ctx->gfx_stages[order[i]];
if (!sel)
continue;
......
......@@ -1380,7 +1380,7 @@ d3d12_enable_fake_so_buffers(struct d3d12_context *ctx, unsigned factor)
d3d12_disable_fake_so_buffers(ctx);
for (int i = 0; i < ctx->gfx_pipeline_state.num_so_targets; ++i) {
for (unsigned i = 0; i < ctx->gfx_pipeline_state.num_so_targets; ++i) {
struct d3d12_stream_output_target *target = (struct d3d12_stream_output_target *)ctx->so_targets[i];
struct d3d12_stream_output_target *fake_target;
......@@ -1393,7 +1393,7 @@ d3d12_enable_fake_so_buffers(struct d3d12_context *ctx, unsigned factor)
d3d12_resource_wait_idle(ctx, d3d12_resource(target->base.buffer));
/* Check if another target is using the same buffer */
for (int j = i - 1; j >= 0; --j) {
for (unsigned j = 0; j < i; ++j) {
if (ctx->so_targets[j] && ctx->so_targets[j]->buffer == target->base.buffer) {
struct d3d12_stream_output_target *prev_target =
(struct d3d12_stream_output_target *)ctx->fake_so_targets[j];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment