diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-11 15:34:56 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-12 07:38:37 -0700 |
commit | 6d8490f9009289c7543aebe6e99d9a627f2383b8 (patch) | |
tree | 3b8ba40c6b4e945aea06cacd304fd9254eaebcd3 /src/gallium/drivers/panfrost | |
parent | 37aefb2be1e72e3be8aec8a0a74517ae683c48b8 (diff) |
panfrost: Fix build warnings
A bunch of these are from asserts not being compiled in 32-bit mode
(once Erik's ASSERTABLE stuff is merged, we'll want to switch).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pan_drm.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pan_mfbd.c | 5 |
3 files changed, 7 insertions, 10 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 17752c98602..cc3a00902e6 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -100,10 +100,8 @@ panfrost_emit_midg_tiler( /* Sanity check */ - unsigned total_size = header_size + body_size; - if (t.hierarchy_mask) { - assert(ctx->tiler_polygon_list.bo->size >= total_size); + assert(ctx->tiler_polygon_list.bo->size >= (header_size + body_size)); /* Specify allocated tiler structures */ t.polygon_list = ctx->tiler_polygon_list.bo->gpu; @@ -775,7 +773,7 @@ panfrost_upload_tex( struct panfrost_sampler_view *view) { if (!view) - return (mali_ptr) NULL; + return (mali_ptr) 0; struct pipe_sampler_view *pview = &view->base; struct panfrost_resource *rsrc = pan_resource(pview->texture); diff --git a/src/gallium/drivers/panfrost/pan_drm.c b/src/gallium/drivers/panfrost/pan_drm.c index 010168fbe31..882523d21de 100644 --- a/src/gallium/drivers/panfrost/pan_drm.c +++ b/src/gallium/drivers/panfrost/pan_drm.c @@ -155,7 +155,7 @@ panfrost_drm_import_bo(struct panfrost_screen *screen, int fd) { struct panfrost_bo *bo = rzalloc(screen, struct panfrost_bo); struct drm_panfrost_get_bo_offset get_bo_offset = {0,}; - int ret; + MAYBE_UNUSED int ret; unsigned gem_handle; ret = drmPrimeFDToHandle(screen->fd, fd, &gem_handle); @@ -238,7 +238,7 @@ panfrost_drm_submit_job(struct panfrost_context *ctx, u64 job_desc, int reqs) int panfrost_drm_submit_vs_fs_job(struct panfrost_context *ctx, bool has_draws, bool is_scanout) { - int ret; + int ret = 0; struct panfrost_job *job = panfrost_get_job_for_fbo(ctx); @@ -320,7 +320,7 @@ unsigned panfrost_drm_query_gpu_version(struct panfrost_screen *screen) { struct drm_panfrost_get_param get_param = {0,}; - int ret; + MAYBE_UNUSED int ret; get_param.param = DRM_PANFROST_PARAM_GPU_PROD_ID; ret = drmIoctl(screen->fd, DRM_IOCTL_PANFROST_GET_PARAM, &get_param); diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index 463e9190400..c957a48032c 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -254,7 +254,6 @@ panfrost_mfbd_set_zsbuf( struct pipe_surface *surf) { struct panfrost_resource *rsrc = pan_resource(surf->texture); - enum pipe_format format = surf->format; unsigned level = surf->u.tex.level; assert(surf->u.tex.first_layer == 0); @@ -264,7 +263,7 @@ panfrost_mfbd_set_zsbuf( if (rsrc->layout == PAN_AFBC) { /* The only Z/S format we can compress is Z24S8 or variants * thereof (handled by the state tracker) */ - assert(format == PIPE_FORMAT_Z24_UNORM_S8_UINT); + assert(surf->format == PIPE_FORMAT_Z24_UNORM_S8_UINT); mali_ptr base = rsrc->bo->gpu + offset; unsigned header_size = rsrc->slices[level].header_size; @@ -287,7 +286,7 @@ panfrost_mfbd_set_zsbuf( } else if (rsrc->layout == PAN_LINEAR) { /* TODO: Z32F(S8) support, which is always linear */ - assert(format == PIPE_FORMAT_Z24_UNORM_S8_UINT); + assert(surf->format == PIPE_FORMAT_Z24_UNORM_S8_UINT); int stride = rsrc->slices[level].stride; fb->mfbd_flags |= MALI_MFBD_EXTRA; |