From 9f80bcc2bc2d9221a67b39715b1b5443b263a091 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 26 Jun 2018 15:58:21 -0700 Subject: [PATCH] v3d: Convert a bunch of our "minus one" fields over to the new XML attr. This fixes up their formatting for CLIF files and makes the code more legible. --- src/broadcom/cle/v3d_packet_v33.xml | 8 ++++---- src/broadcom/cle/v3d_packet_v41.xml | 20 ++++++++++---------- src/broadcom/cle/v3d_packet_v42.xml | 20 ++++++++++---------- src/gallium/drivers/v3d/v3d_program.c | 2 +- src/gallium/drivers/v3d/v3dx_draw.c | 11 +++++++---- src/gallium/drivers/v3d/v3dx_rcl.c | 7 +++---- 6 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/broadcom/cle/v3d_packet_v33.xml b/src/broadcom/cle/v3d_packet_v33.xml index 22d43cc8025..1ece1c95558 100644 --- a/src/broadcom/cle/v3d_packet_v33.xml +++ b/src/broadcom/cle/v3d_packet_v33.xml @@ -383,7 +383,7 @@ - + @@ -559,7 +559,7 @@ - + @@ -658,8 +658,8 @@ - - + + diff --git a/src/broadcom/cle/v3d_packet_v41.xml b/src/broadcom/cle/v3d_packet_v41.xml index c5165614079..9f0c54eadc9 100644 --- a/src/broadcom/cle/v3d_packet_v41.xml +++ b/src/broadcom/cle/v3d_packet_v41.xml @@ -416,7 +416,7 @@ - + @@ -567,13 +567,13 @@ - + - - + + @@ -584,7 +584,7 @@ - + @@ -619,7 +619,7 @@ - + @@ -700,8 +700,8 @@ - - + + @@ -773,13 +773,13 @@ - + - + diff --git a/src/broadcom/cle/v3d_packet_v42.xml b/src/broadcom/cle/v3d_packet_v42.xml index fb4425968c3..5a335d89c22 100644 --- a/src/broadcom/cle/v3d_packet_v42.xml +++ b/src/broadcom/cle/v3d_packet_v42.xml @@ -417,7 +417,7 @@ - + @@ -568,13 +568,13 @@ - + - - + + @@ -585,7 +585,7 @@ - + @@ -620,7 +620,7 @@ - + @@ -701,8 +701,8 @@ - - + + @@ -774,13 +774,13 @@ - + - + diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index ef7dd375bf7..c67104df234 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -121,7 +121,7 @@ v3d_set_transform_feedback_outputs(struct v3d_uncompiled_shader *so, * values at the start. */ .first_shaded_vertex_value_to_output = vpm_start_offset, - .number_of_consecutive_vertex_values_to_output_as_32_bit_values_minus_1 = write_size - 1, + .number_of_consecutive_vertex_values_to_output_as_32_bit_values = write_size, .output_buffer_to_write_to = buffer, }; diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 1cf4d803f68..1e8b472a27d 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -78,10 +78,10 @@ v3d_start_draw(struct v3d_context *v3d) cl_emit(&job->bcl, TILE_BINNING_MODE_CONFIGURATION_PART1, config) { #if V3D_VERSION >= 40 - config.width_in_pixels_minus_1 = v3d->framebuffer.width - 1; - config.height_in_pixels_minus_1 = v3d->framebuffer.height - 1; - config.number_of_render_targets_minus_1 = - MAX2(v3d->framebuffer.nr_cbufs, 1) - 1; + config.width_in_pixels = v3d->framebuffer.width; + config.height_in_pixels = v3d->framebuffer.height; + config.number_of_render_targets = + MAX2(v3d->framebuffer.nr_cbufs, 1); #else /* V3D_VERSION < 40 */ config.tile_state_data_array_base_address = cl_address(job->tile_state, 0); @@ -214,6 +214,9 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d, shader.fragment_shader_uniforms_address = fs_uniforms; #if V3D_VERSION >= 41 + shader.min_coord_shader_input_segments_required_in_play = 1; + shader.min_vertex_shader_input_segments_required_in_play = 1; + shader.coordinate_shader_4_way_threadable = v3d->prog.cs->prog_data.vs->base.threads == 4; shader.vertex_shader_4_way_threadable = diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c index 766f7909c17..549ad1a456e 100644 --- a/src/gallium/drivers/v3d/v3dx_rcl.c +++ b/src/gallium/drivers/v3d/v3dx_rcl.c @@ -539,8 +539,7 @@ v3dX(emit_rcl)(struct v3d_job *job) config.image_width_pixels = job->draw_width; config.image_height_pixels = job->draw_height; - config.number_of_render_targets_minus_1 = - MAX2(nr_cbufs, 1) - 1; + config.number_of_render_targets = MAX2(nr_cbufs, 1); config.multisample_mode_4x = job->msaa; @@ -709,8 +708,8 @@ v3dX(emit_rcl)(struct v3d_job *job) config.total_frame_width_in_tiles = job->draw_tiles_x; config.total_frame_height_in_tiles = job->draw_tiles_y; - config.supertile_width_in_tiles_minus_1 = supertile_w - 1; - config.supertile_height_in_tiles_minus_1 = supertile_h - 1; + config.supertile_width_in_tiles = supertile_w; + config.supertile_height_in_tiles = supertile_h; config.total_frame_width_in_supertiles = frame_w_in_supertiles; config.total_frame_height_in_supertiles = frame_h_in_supertiles; -- 2.30.2