diff options
author | Eric Anholt <[email protected]> | 2018-12-04 14:32:27 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-12-07 16:48:23 -0800 |
commit | 8cb1f3bab7741d7c4a862921ad3a5a855840ed91 (patch) | |
tree | cd44614cc35ac83418fc1fe78deb6608004ffa5a /src/gallium/drivers/v3d/v3dx_state.c | |
parent | ee9b758053760ebaee7b5950be358de461a1cd8d (diff) |
v3d: Avoid confusing auto-indenting in TEXTURE_SHADER_STATE packing
Having "v3dx_pack() {" under each #if branch would confuse emacs's
indenter.
Diffstat (limited to 'src/gallium/drivers/v3d/v3dx_state.c')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_state.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index cf64fc42452..980d755755c 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -712,18 +712,18 @@ v3d_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, int msaa_scale = prsc->nr_samples > 1 ? 2 : 1; + void *map; #if V3D_VERSION >= 40 so->bo = v3d_bo_alloc(v3d->screen, cl_packet_length(TEXTURE_SHADER_STATE), "sampler"); - void *map = v3d_bo_map(so->bo); - - v3dx_pack(map, TEXTURE_SHADER_STATE, tex) { + map = v3d_bo_map(so->bo); #else /* V3D_VERSION < 40 */ STATIC_ASSERT(sizeof(so->texture_shader_state) >= cl_packet_length(TEXTURE_SHADER_STATE)); - v3dx_pack(&so->texture_shader_state, TEXTURE_SHADER_STATE, tex) { + map = &so->texture_shader_state; #endif + v3dx_pack(map, TEXTURE_SHADER_STATE, tex) { tex.image_width = prsc->width0 * msaa_scale; tex.image_height = prsc->height0 * msaa_scale; |