asahi: Fix style nits
authorAsahi Lina <lina@asahilina.net>
Wed, 5 Apr 2023 10:48:12 +0000 (19:48 +0900)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Apr 2023 03:23:04 +0000 (03:23 +0000)
Found with a grep abomination which is probably too broken/silly to
actually implement in CI... but hey, at least it found some.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22353>

src/asahi/compiler/agx_compile.c
src/asahi/compiler/agx_nir_lower_texture.c
src/asahi/lib/decode.c
src/gallium/drivers/asahi/agx_query.c
src/gallium/drivers/asahi/agx_state.c

index ffabb08..1e18806 100644 (file)
@@ -2239,9 +2239,10 @@ agx_compile_function_nir(nir_shader *nir, nir_function_impl *impl,
       int ret = agx_dump_stats(ctx, binary->size, &stats);
 
       if (ret >= 0) {
-         if (agx_should_dump(nir, AGX_DBG_SHADERDB))
+         if (agx_should_dump(nir, AGX_DBG_SHADERDB)) {
             fprintf(stderr, "SHADER-DB: %s - %s\n", nir->info.label ?: "",
                     stats);
+         }
 
          if (debug)
             util_debug_message(debug, SHADER_INFO, "%s", stats);
index 5894ae0..fbd1dfb 100644 (file)
@@ -95,9 +95,10 @@ agx_txs(nir_builder *b, nir_tex_instr *tex)
 
    /* Add LOD offset to first level to get the interesting LOD */
    int lod_idx = nir_tex_instr_src_index(tex, nir_tex_src_lod);
-   if (lod_idx >= 0)
+   if (lod_idx >= 0) {
       lod = nir_iadd(
          b, lod, nir_u2u32(b, nir_ssa_for_src(b, tex->src[lod_idx].src, 1)));
+   }
 
    /* Add 1 to width-1, height-1 to get base dimensions */
    nir_ssa_def *width = nir_iadd_imm(b, width_m1, 1);
index 5756087..ac6aa47 100644 (file)
@@ -825,10 +825,11 @@ agxdecode_dump_file_open(void)
                agxdecode_dump_frame_count);
       printf("agxdecode: dump command stream to file %s\n", buffer);
       agxdecode_dump_stream = fopen(buffer, "w");
-      if (!agxdecode_dump_stream)
+      if (!agxdecode_dump_stream) {
          fprintf(stderr,
                  "agxdecode: failed to open command stream log file %s\n",
                  buffer);
+      }
    }
 }
 
index a0ff593..0fe2e3c 100644 (file)
@@ -50,9 +50,10 @@ agx_begin_query(struct pipe_context *pctx, struct pipe_query *pquery)
        * other than piglit) actually hits this, we could shadow the query to
        * avoid the flush.
        */
-      if (query->writer)
+      if (query->writer) {
          agx_flush_batch_for_reason(ctx, query->writer,
                                     "Occlusion overwritten");
+      }
 
       assert(query->writer == NULL);
 
index b85a290..b3be212 100644 (file)
@@ -2347,9 +2347,10 @@ agx_encode_state(struct agx_batch *batch, uint8_t *out, bool is_lines,
    if (dirty.fragment_front_face_2)
       agx_ppp_fragment_face_2(&ppp, object_type, &ctx->fs->info);
 
-   if (dirty.fragment_front_stencil)
+   if (dirty.fragment_front_stencil) {
       agx_ppp_push_packed(&ppp, ctx->zs->front_stencil.opaque,
                           FRAGMENT_STENCIL);
+   }
 
    if (dirty.fragment_back_face) {
       struct agx_fragment_face_packed back_face;