diff options
author | Eric Anholt <[email protected]> | 2018-07-30 13:17:39 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-07-30 14:29:01 -0700 |
commit | b56f8c475e5bf6a3b77c597723631ebde4f31358 (patch) | |
tree | 58731c4994f85a43730a7a64ffa492ab1e7c9e39 /src/gallium | |
parent | 300e609feb173d40873020c3e250f9257b5f3321 (diff) |
v3d: Rename "configuration" and "config" in the XML to "cfg"
This matches what CLIF parsing expects, and makes
TILE_BINNING_MODE_CONFIGURATION_COMMON_CONFIGURATION into a much more
legible TILE_BINNING_MODE_CFG_COMMON.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 26 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_emit.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_rcl.c | 21 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_state.c | 8 |
4 files changed, 33 insertions, 30 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 03762e529df..479adb70fdb 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -63,26 +63,30 @@ v3d_start_draw(struct v3d_context *v3d) tsda_per_tile_size, "TSDA"); -#if V3D_VERSION < 40 +#if V3D_VERSION >= 40 + cl_emit(&job->bcl, TILE_BINNING_MODE_CFG, config) { + 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); + + config.multisample_mode_4x = job->msaa; + + config.maximum_bpp_of_all_render_targets = job->internal_bpp; + } +#else /* V3D_VERSION < 40 */ /* "Binning mode lists start with a Tile Binning Mode Configuration * item (120)" * * Part1 signals the end of binning config setup. */ - cl_emit(&job->bcl, TILE_BINNING_MODE_CONFIGURATION_PART2, config) { + cl_emit(&job->bcl, TILE_BINNING_MODE_CFG_PART2, config) { config.tile_allocation_memory_address = cl_address(job->tile_alloc, 0); config.tile_allocation_memory_size = job->tile_alloc->size; } -#endif - cl_emit(&job->bcl, TILE_BINNING_MODE_CONFIGURATION_PART1, config) { -#if V3D_VERSION >= 40 - 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 */ + cl_emit(&job->bcl, TILE_BINNING_MODE_CFG_PART1, config) { config.tile_state_data_array_base_address = cl_address(job->tile_state, 0); @@ -91,12 +95,12 @@ v3d_start_draw(struct v3d_context *v3d) /* Must be >= 1 */ config.number_of_render_targets = MAX2(v3d->framebuffer.nr_cbufs, 1); -#endif /* V3D_VERSION < 40 */ config.multisample_mode_4x = job->msaa; config.maximum_bpp_of_all_render_targets = job->internal_bpp; } +#endif /* V3D_VERSION < 40 */ /* There's definitely nothing in the VCD cache we want. */ cl_emit(&job->bcl, FLUSH_VCD_CACHE, bin); diff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c index 59bcf126c78..c58ac4b44a2 100644 --- a/src/gallium/drivers/v3d/v3dx_emit.c +++ b/src/gallium/drivers/v3d/v3dx_emit.c @@ -284,7 +284,7 @@ emit_rt_blend(struct v3d_context *v3d, struct v3d_job *job, return; #endif - cl_emit(&job->bcl, BLEND_CONFIG, config) { + cl_emit(&job->bcl, BLEND_CFG, config) { #if V3D_VERSION >= 40 if (blend->independent_blend_enable) config.render_target_mask = 1 << rt; @@ -463,7 +463,7 @@ v3dX(emit_state)(struct pipe_context *pctx) VC5_DIRTY_ZSA | VC5_DIRTY_BLEND | VC5_DIRTY_COMPILED_FS)) { - cl_emit(&job->bcl, CONFIGURATION_BITS, config) { + cl_emit(&job->bcl, CFG_BITS, config) { config.enable_forward_facing_primitive = !rasterizer_discard && !(v3d->rasterizer->base.cull_face & @@ -630,7 +630,7 @@ v3dX(emit_state)(struct pipe_context *pctx) struct pipe_stencil_state *back = &v3d->zsa->base.stencil[1]; if (front->enabled) { - cl_emit_with_prepacked(&job->bcl, STENCIL_CONFIG, + cl_emit_with_prepacked(&job->bcl, STENCIL_CFG, v3d->zsa->stencil_front, config) { config.stencil_ref_value = v3d->stencil_ref.ref_value[0]; @@ -638,7 +638,7 @@ v3dX(emit_state)(struct pipe_context *pctx) } if (back->enabled) { - cl_emit_with_prepacked(&job->bcl, STENCIL_CONFIG, + cl_emit_with_prepacked(&job->bcl, STENCIL_CFG, v3d->zsa->stencil_back, config) { config.stencil_ref_value = v3d->stencil_ref.ref_value[1]; diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c index acd6e9297e4..3a76b0f3b24 100644 --- a/src/gallium/drivers/v3d/v3dx_rcl.c +++ b/src/gallium/drivers/v3d/v3dx_rcl.c @@ -457,7 +457,7 @@ static void v3d_emit_z_stencil_config(struct v3d_job *job, struct v3d_surface *surf, struct v3d_resource *rsc, bool is_separate_stencil) { - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_Z_STENCIL_CONFIG, zs) { + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_Z_STENCIL, zs) { zs.address = cl_address(rsc->bo, surf->offset); if (!is_separate_stencil) { @@ -501,12 +501,11 @@ v3dX(emit_rcl)(struct v3d_job *job) nr_cbufs = i + 1; } - /* Comon config must be the first TILE_RENDERING_MODE_CONFIGURATION + /* Comon config must be the first TILE_RENDERING_MODE_CFG * and Z_STENCIL_CLEAR_VALUES must be last. The ones in between are * optional updates to the previous HW state. */ - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_COMMON_CONFIGURATION, - config) { + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_COMMON, config) { #if V3D_VERSION < 40 config.enable_z_store = job->store & PIPE_CLEAR_DEPTH; config.enable_stencil_store = job->store & PIPE_CLEAR_STENCIL; @@ -572,7 +571,7 @@ v3dX(emit_rcl)(struct v3d_job *job) } #if V3D_VERSION < 40 - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_RENDER_TARGET_CONFIG, rt) { + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) { rt.address = cl_address(rsc->bo, surf->offset); rt.internal_type = surf->internal_type; rt.output_image_format = surf->format; @@ -586,7 +585,7 @@ v3dX(emit_rcl)(struct v3d_job *job) } #endif /* V3D_VERSION < 40 */ - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART1, + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1, clear) { clear.clear_color_low_32_bits = job->clear_color[i][0]; clear.clear_color_next_24_bits = job->clear_color[i][1] & 0xffffff; @@ -594,7 +593,7 @@ v3dX(emit_rcl)(struct v3d_job *job) }; if (surf->internal_bpp >= V3D_INTERNAL_BPP_64) { - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART2, + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2, clear) { clear.clear_color_mid_low_32_bits = ((job->clear_color[i][1] >> 24) | @@ -607,7 +606,7 @@ v3dX(emit_rcl)(struct v3d_job *job) } if (surf->internal_bpp >= V3D_INTERNAL_BPP_128 || clear_pad) { - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART3, + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3, clear) { clear.uif_padded_height_in_uif_blocks = clear_pad; clear.clear_color_high_16_bits = job->clear_color[i][3] >> 16; @@ -617,7 +616,7 @@ v3dX(emit_rcl)(struct v3d_job *job) } #if V3D_VERSION >= 40 - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_RENDER_TARGET_CONFIG, rt) { + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) { v3d_setup_render_target(job, 0, &rt.render_target_0_internal_bpp, &rt.render_target_0_internal_type, @@ -659,7 +658,7 @@ v3dX(emit_rcl)(struct v3d_job *job) #endif /* V3D_VERSION < 40 */ /* Ends rendering mode config. */ - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_Z_STENCIL_CLEAR_VALUES, + cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES, clear) { clear.z_clear_value = job->clear_z; clear.stencil_clear_value = job->clear_s; @@ -683,7 +682,7 @@ v3dX(emit_rcl)(struct v3d_job *job) list.address = cl_address(job->tile_alloc, 0); } - cl_emit(&job->rcl, MULTICORE_RENDERING_SUPERTILE_CONFIGURATION, config) { + cl_emit(&job->rcl, MULTICORE_RENDERING_SUPERTILE_CFG, config) { uint32_t frame_w_in_supertiles, frame_h_in_supertiles; const uint32_t max_supertiles = 256; diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index a154936d048..4bba8992c00 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -210,8 +210,8 @@ v3d_create_depth_stencil_alpha_state(struct pipe_context *pctx, if (front->enabled) { STATIC_ASSERT(sizeof(so->stencil_front) >= - cl_packet_length(STENCIL_CONFIG)); - v3dx_pack(&so->stencil_front, STENCIL_CONFIG, config) { + cl_packet_length(STENCIL_CFG)); + v3dx_pack(&so->stencil_front, STENCIL_CFG, config) { config.front_config = true; /* If !back->enabled, then the front values should be * used for both front and back-facing primitives. @@ -232,8 +232,8 @@ v3d_create_depth_stencil_alpha_state(struct pipe_context *pctx, } if (back->enabled) { STATIC_ASSERT(sizeof(so->stencil_back) >= - cl_packet_length(STENCIL_CONFIG)); - v3dx_pack(&so->stencil_back, STENCIL_CONFIG, config) { + cl_packet_length(STENCIL_CFG)); + v3dx_pack(&so->stencil_back, STENCIL_CFG, config) { config.front_config = false; config.back_config = true; |