gallium/radeon: fix warnings
authorMarek Olšák <marek.olsak@amd.com>
Thu, 6 Feb 2014 16:43:29 +0000 (17:43 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 6 Feb 2014 16:43:29 +0000 (17:43 +0100)
src/gallium/drivers/r600/sb/sb_bc_finalize.cpp
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
src/gallium/winsys/radeon/drm/radeon_drm_cs_dump.c

index 54717f98a159f6865458c01eea0149be7e1cd739..99a20eb00c80a07dbcc0cab3541edcbf7e0766d2 100644 (file)
@@ -814,6 +814,8 @@ unsigned bc_finalizer::get_stack_depth(node *n, unsigned &loops,
                if (has_non_wqm_push)
                        ++stack_elements;
                break;
+       case HW_CLASS_UNKNOWN:
+               assert(0);
        }
        return stack_elements;
 }
index b7ded978f657c3100aa33db9e8f4b2571c7ec407..60ade78b5f220d020e32262276ca40471ac01415 100644 (file)
@@ -159,7 +159,7 @@ emit_fetch(
        struct radeon_llvm_context * ctx = radeon_llvm_context(bld_base);
        struct lp_build_tgsi_soa_context *bld = lp_soa_context(bld_base);
        LLVMBuilderRef builder = bld_base->base.gallivm->builder;
-       LLVMValueRef result, ptr;
+       LLVMValueRef result = NULL, ptr;
 
        if (swizzle == ~0) {
                LLVMValueRef values[TGSI_NUM_CHANNELS];
@@ -409,8 +409,10 @@ emit_store(
                                break;
 
                        case TGSI_FILE_TEMPORARY:
-                               if (uses_temp_indirect_addressing(bld_base))
+                               if (uses_temp_indirect_addressing(bld_base)) {
+                                       temp_ptr = NULL;
                                        break;
+                               }
                                temp_ptr = ctx->temps[ TGSI_NUM_CHANNELS * reg->Register.Index + chan_index];
                                break;
 
index e738a98867971f234dc5319bfb17a03c80cf6c57..c2c0dab346675798d45727bef9706f1c9502b405 100644 (file)
@@ -101,7 +101,7 @@ void radeon_dump_cs_on_lockup(struct radeon_drm_cs *cs, struct radeon_cs_context
             for (j = 0; j < ndw; j++) {
                 if (j && !(j % 8)) {
                     uint32_t offset = (j - 8) << 2;
-                    fprintf(dump, "  /* [0x%08x] va[0x%016lx] */\n   ", offset, offset + csc->relocs_bo[i]->va);
+                    fprintf(dump, "  /* [0x%08x] va[0x%016llx] */\n   ", offset, offset + csc->relocs_bo[i]->va);
                 }
                 fprintf(dump, " 0x%08x,", ptr[j]);
             }
@@ -143,10 +143,10 @@ void radeon_dump_cs_on_lockup(struct radeon_drm_cs *cs, struct radeon_cs_context
 
         ptr = radeon_bo_do_map(csc->relocs_bo[i]);
         if (ptr) {
-            fprintf(dump, "    bo[%d] = bo_new(&ctx, %d, bo_%04d_data, 0x%016lx, 0x%08x);\n",
+            fprintf(dump, "    bo[%d] = bo_new(&ctx, %d, bo_%04d_data, 0x%016llx, 0x%08x);\n",
                     i, ndw, i, csc->relocs_bo[i]->va, csc->relocs_bo[i]->base.alignment);
         } else {
-            fprintf(dump, "    bo[%d] = bo_new(&ctx, %d, NULL, 0x%016lx, 0x%08x);\n",
+            fprintf(dump, "    bo[%d] = bo_new(&ctx, %d, NULL, 0x%016llx, 0x%08x);\n",
                     i, ndw, csc->relocs_bo[i]->va, csc->relocs_bo[i]->base.alignment);
         }
     }