mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
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.
This commit is contained in:
parent
18b1bb0b63
commit
9f80bcc2bc
6 changed files with 35 additions and 33 deletions
|
|
@ -383,7 +383,7 @@
|
|||
|
||||
<struct name="Transform Feedback Output Data Spec">
|
||||
<field name="First Shaded Vertex Value to output" size="8" start="0" type="uint"/>
|
||||
<field name="Number of consecutive Vertex Values to output as 32-bit values minus 1" size="4" start="8" type="uint"/>
|
||||
<field name="Number of consecutive Vertex Values to output as 32-bit values" size="4" start="8" type="uint" minus_one="true"/>
|
||||
<field name="Output Buffer to write to" size="2" start="12" type="uint"/>
|
||||
</struct>
|
||||
|
||||
|
|
@ -559,7 +559,7 @@
|
|||
|
||||
<field name="Image Height (pixels)" size="16" start="24" type="uint"/>
|
||||
<field name="Image Width (pixels)" size="16" start="8" type="uint"/>
|
||||
<field name="Number of Render Targets Minus 1" size="4" start="4" type="uint"/>
|
||||
<field name="Number of Render Targets" size="4" start="4" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="sub-id" size="4" start="0" type="uint" default="0"/>
|
||||
</packet>
|
||||
|
|
@ -658,8 +658,8 @@
|
|||
<field name="Total Frame Height in Supertiles" size="8" start="24" type="uint"/>
|
||||
<field name="Total Frame Width in Supertiles" size="8" start="16" type="uint"/>
|
||||
|
||||
<field name="Supertile Height in Tiles minus 1" size="8" start="8" type="uint"/>
|
||||
<field name="Supertile Width in Tiles minus 1" size="8" start="0" type="uint"/>
|
||||
<field name="Supertile Height in Tiles" size="8" start="8" type="uint" minus_one="true"/>
|
||||
<field name="Supertile Width in Tiles" size="8" start="0" type="uint" minus_one="true"/>
|
||||
</packet>
|
||||
|
||||
<packet code="123" name="Multicore Rendering Tile List Set Base" cl="R">
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@
|
|||
|
||||
<struct name="Transform Feedback Output Data Spec">
|
||||
<field name="First Shaded Vertex Value to output" size="8" start="0" type="uint"/>
|
||||
<field name="Number of consecutive Vertex Values to output as 32-bit values minus 1" size="4" start="8" type="uint"/>
|
||||
<field name="Number of consecutive Vertex Values to output as 32-bit values" size="4" start="8" type="uint" minus_one="true"/>
|
||||
<field name="Output Buffer to write to" size="2" start="12" type="uint"/>
|
||||
</struct>
|
||||
|
||||
|
|
@ -567,13 +567,13 @@
|
|||
</packet>
|
||||
|
||||
<packet name="Number of Layers" code="119">
|
||||
<field name="Number of Layers Minus 1" size="8" start="0" type="uint"/>
|
||||
<field name="Number of Layers" size="8" start="0" type="uint" minus_one="true"/>
|
||||
</packet>
|
||||
|
||||
<packet code="120" name="Tile Binning Mode Configuration (Part1)">
|
||||
|
||||
<field name="Height (in pixels minus 1)" size="12" start="48" type="uint"/>
|
||||
<field name="Width (in pixels minus 1)" size="12" start="32" type="uint"/>
|
||||
<field name="Height (in pixels)" size="12" start="48" type="uint" minus_one="true"/>
|
||||
<field name="Width (in pixels)" size="12" start="32" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="Double-buffer in non-ms mode" size="1" start="15" type="bool"/>
|
||||
<field name="Multisample Mode (4x)" size="1" start="14" type="bool"/>
|
||||
|
|
@ -584,7 +584,7 @@
|
|||
<value name="Render target maximum 128bpp" value="2"/>
|
||||
</field>
|
||||
|
||||
<field name="Number of Render Targets minus 1" size="4" start="8" type="uint"/>
|
||||
<field name="Number of Render Targets" size="4" start="8" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="tile allocation block size" size="2" start="4" type="uint">
|
||||
<value name="tile allocation block size 64b" value="0"/>
|
||||
|
|
@ -619,7 +619,7 @@
|
|||
|
||||
<field name="Image Height (pixels)" size="16" start="24" type="uint"/>
|
||||
<field name="Image Width (pixels)" size="16" start="8" type="uint"/>
|
||||
<field name="Number of Render Targets Minus 1" size="4" start="4" type="uint"/>
|
||||
<field name="Number of Render Targets" size="4" start="4" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="sub-id" size="4" start="0" type="uint" default="0"/>
|
||||
</packet>
|
||||
|
|
@ -700,8 +700,8 @@
|
|||
<field name="Total Frame Height in Supertiles" size="8" start="24" type="uint"/>
|
||||
<field name="Total Frame Width in Supertiles" size="8" start="16" type="uint"/>
|
||||
|
||||
<field name="Supertile Height in Tiles minus 1" size="8" start="8" type="uint"/>
|
||||
<field name="Supertile Width in Tiles minus 1" size="8" start="0" type="uint"/>
|
||||
<field name="Supertile Height in Tiles" size="8" start="8" type="uint" minus_one="true"/>
|
||||
<field name="Supertile Width in Tiles" size="8" start="0" type="uint" minus_one="true"/>
|
||||
</packet>
|
||||
|
||||
<packet code="123" name="Multicore Rendering Tile List Set Base" cl="R">
|
||||
|
|
@ -773,13 +773,13 @@
|
|||
<field name="Min Coord Shader output segments required in play in addition to VCM cache size" size="4" start="36" type="uint"/>
|
||||
|
||||
<field name="Coordinate Shader input VPM segment size" size="4" start="5b" type="uint"/>
|
||||
<field name="Min Coord Shader input segments required in play minus 1" size="4" start="44" type="uint"/>
|
||||
<field name="Min Coord Shader input segments required in play" size="4" start="44" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="Vertex Shader output VPM segment size" size="4" start="6b" type="uint"/>
|
||||
<field name="Min Vertex Shader output segments required in play in addition to VCM cache size" size="4" start="52" type="uint"/>
|
||||
|
||||
<field name="Vertex Shader input VPM segment size" size="4" start="7b" type="uint"/>
|
||||
<field name="Min Vertex Shader input segments required in play minus 1" size="4" start="60" type="uint"/>
|
||||
<field name="Min Vertex Shader input segments required in play" size="4" start="60" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="Address of default attribute values" size="32" start="8b" type="address"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@
|
|||
|
||||
<struct name="Transform Feedback Output Data Spec">
|
||||
<field name="First Shaded Vertex Value to output" size="8" start="0" type="uint"/>
|
||||
<field name="Number of consecutive Vertex Values to output as 32-bit values minus 1" size="4" start="8" type="uint"/>
|
||||
<field name="Number of consecutive Vertex Values to output as 32-bit values" size="4" start="8" type="uint" minus_one="true"/>
|
||||
<field name="Output Buffer to write to" size="2" start="12" type="uint"/>
|
||||
</struct>
|
||||
|
||||
|
|
@ -568,13 +568,13 @@
|
|||
</packet>
|
||||
|
||||
<packet name="Number of Layers" code="119">
|
||||
<field name="Number of Layers Minus 1" size="8" start="0" type="uint"/>
|
||||
<field name="Number of Layers" size="8" start="0" type="uint" minus_one="true"/>
|
||||
</packet>
|
||||
|
||||
<packet code="120" name="Tile Binning Mode Configuration (Part1)">
|
||||
|
||||
<field name="Height (in pixels minus 1)" size="12" start="48" type="uint"/>
|
||||
<field name="Width (in pixels minus 1)" size="12" start="32" type="uint"/>
|
||||
<field name="Height (in pixels)" size="12" start="48" type="uint" minus_one="true"/>
|
||||
<field name="Width (in pixels)" size="12" start="32" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="Double-buffer in non-ms mode" size="1" start="15" type="bool"/>
|
||||
<field name="Multisample Mode (4x)" size="1" start="14" type="bool"/>
|
||||
|
|
@ -585,7 +585,7 @@
|
|||
<value name="Render target maximum 128bpp" value="2"/>
|
||||
</field>
|
||||
|
||||
<field name="Number of Render Targets minus 1" size="4" start="8" type="uint"/>
|
||||
<field name="Number of Render Targets" size="4" start="8" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="tile allocation block size" size="2" start="4" type="uint">
|
||||
<value name="tile allocation block size 64b" value="0"/>
|
||||
|
|
@ -620,7 +620,7 @@
|
|||
|
||||
<field name="Image Height (pixels)" size="16" start="24" type="uint"/>
|
||||
<field name="Image Width (pixels)" size="16" start="8" type="uint"/>
|
||||
<field name="Number of Render Targets Minus 1" size="4" start="4" type="uint"/>
|
||||
<field name="Number of Render Targets" size="4" start="4" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="sub-id" size="4" start="0" type="uint" default="0"/>
|
||||
</packet>
|
||||
|
|
@ -701,8 +701,8 @@
|
|||
<field name="Total Frame Height in Supertiles" size="8" start="24" type="uint"/>
|
||||
<field name="Total Frame Width in Supertiles" size="8" start="16" type="uint"/>
|
||||
|
||||
<field name="Supertile Height in Tiles minus 1" size="8" start="8" type="uint"/>
|
||||
<field name="Supertile Width in Tiles minus 1" size="8" start="0" type="uint"/>
|
||||
<field name="Supertile Height in Tiles" size="8" start="8" type="uint" minus_one="true"/>
|
||||
<field name="Supertile Width in Tiles" size="8" start="0" type="uint" minus_one="true"/>
|
||||
</packet>
|
||||
|
||||
<packet code="123" name="Multicore Rendering Tile List Set Base" cl="R">
|
||||
|
|
@ -774,13 +774,13 @@
|
|||
<field name="Min Coord Shader output segments required in play in addition to VCM cache size" size="4" start="36" type="uint"/>
|
||||
|
||||
<field name="Coordinate Shader input VPM segment size" size="4" start="5b" type="uint"/>
|
||||
<field name="Min Coord Shader input segments required in play minus 1" size="4" start="44" type="uint"/>
|
||||
<field name="Min Coord Shader input segments required in play" size="4" start="44" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="Vertex Shader output VPM segment size" size="4" start="6b" type="uint"/>
|
||||
<field name="Min Vertex Shader output segments required in play in addition to VCM cache size" size="4" start="52" type="uint"/>
|
||||
|
||||
<field name="Vertex Shader input VPM segment size" size="4" start="7b" type="uint"/>
|
||||
<field name="Min Vertex Shader input segments required in play minus 1" size="4" start="60" type="uint"/>
|
||||
<field name="Min Vertex Shader input segments required in play" size="4" start="60" type="uint" minus_one="true"/>
|
||||
|
||||
<field name="Address of default attribute values" size="32" start="8b" type="address"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue