r600_exa.c: In function 'R600PrepareCopy': r600_exa.c:762: warning: unused variable 'ret' r600_exa.c: In function 'R600PrepareComposite': r600_exa.c:1657: warning: unused variable 'ret'
These variables are used only if XF86DRM_MODE is defined. r6xx_accel.c: In function 'wait_3d_idle_clean': r6xx_accel.c:117: warning: unused variable 'info' r6xx_accel.c: In function 'wait_3d_idle': r6xx_accel.c:132: warning: unused variable 'info' r6xx_accel.c: In function 'cp_set_surface_sync': r6xx_accel.c:282: warning: unused variable 'info' r6xx_accel.c: In function 'fs_setup': r6xx_accel.c:385: warning: unused variable 'info' r6xx_accel.c: In function 'vs_setup': r6xx_accel.c:408: warning: unused variable 'info' r6xx_accel.c: In function 'ps_setup': r6xx_accel.c:435: warning: unused variable 'info' r6xx_accel.c: In function 'set_alu_consts': r6xx_accel.c:465: warning: unused variable 'info' r6xx_accel.c: In function 'set_bool_consts': r6xx_accel.c:479: warning: unused variable 'info' r6xx_accel.c: In function 'set_vtx_resource': r6xx_accel.c:491: warning: unused variable 'info' r6xx_accel.c: In function 'set_tex_resource': r6xx_accel.c:524: warning: unused variable 'info' r6xx_accel.c: In function 'set_tex_sampler': r6xx_accel.c:591: warning: unused variable 'info' r6xx_accel.c: In function 'set_screen_scissor': r6xx_accel.c:643: warning: unused variable 'info' r6xx_accel.c: In function 'set_vport_scissor': r6xx_accel.c:656: warning: unused variable 'info' r6xx_accel.c: In function 'set_generic_scissor': r6xx_accel.c:672: warning: unused variable 'info' r6xx_accel.c: In function 'set_window_scissor': r6xx_accel.c:686: warning: unused variable 'info' r6xx_accel.c: In function 'set_clip_rect': r6xx_accel.c:700: warning: unused variable 'info' r6xx_accel.c: In function 'draw_immd': r6xx_accel.c:1109: warning: unused variable 'info' r6xx_accel.c: In function 'draw_auto': r6xx_accel.c:1147: warning: unused variable 'info' These are really unused. Signed-off-by: Kusanagi Kouichi <[email protected]> --- src/r600_exa.c | 6 ++++-- src/r6xx_accel.c | 26 -------------------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/r600_exa.c b/src/r600_exa.c index 1405db7..f21e8f0 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -759,7 +759,6 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; - int ret; if (!R600CheckBPP(pSrc->drawable.bitsPerPixel)) RADEON_FALLBACK(("R600CheckDatatype src failed\n")); @@ -811,6 +810,8 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, #if defined(XF86DRM_MODE) if (info->cs) { + int ret; + radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); @@ -1654,7 +1655,6 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, uint32_t blendcntl, dst_format; cb_config_t cb_conf; shader_config_t vs_conf, ps_conf; - int ret; /* return FALSE; */ @@ -1681,6 +1681,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, #if defined(XF86DRM_MODE) if (info->cs) { + int ret; + accel_state->dst_mc_addr = 0; accel_state->dst_bo = radeon_get_pixmap_bo(pDst); accel_state->src_bo[0] = radeon_get_pixmap_bo(pSrc); diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c index 0ca44ad..24191d5 100644 --- a/src/r6xx_accel.c +++ b/src/r6xx_accel.c @@ -114,8 +114,6 @@ void R600IBDiscard(ScrnInfoPtr pScrn, drmBufPtr ib) void wait_3d_idle_clean(ScrnInfoPtr pScrn, drmBufPtr ib) { - RADEONInfoPtr info = RADEONPTR(pScrn); - //flush caches, don't generate timestamp BEGIN_BATCH(5); PACK3(ib, IT_EVENT_WRITE, 1); @@ -129,8 +127,6 @@ wait_3d_idle_clean(ScrnInfoPtr pScrn, drmBufPtr ib) void wait_3d_idle(ScrnInfoPtr pScrn, drmBufPtr ib) { - RADEONInfoPtr info = RADEONPTR(pScrn); - BEGIN_BATCH(3); EREG(ib, WAIT_UNTIL, WAIT_3D_IDLE_bit); END_BATCH(); @@ -279,7 +275,6 @@ void cp_set_surface_sync(ScrnInfoPtr pScrn, drmBufPtr ib, uint32_t sync_type, uint32_t size, uint64_t mc_addr, struct radeon_bo *bo, uint32_t rdomains, uint32_t wdomain) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t cp_coher_size; if (size == 0xffffffff) cp_coher_size = 0xffffffff; @@ -382,7 +377,6 @@ void cp_wait_vline_sync(ScrnInfoPtr pScrn, drmBufPtr ib, PixmapPtr pPix, void fs_setup(ScrnInfoPtr pScrn, drmBufPtr ib, shader_config_t *fs_conf) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources; sq_pgm_resources = ((fs_conf->num_gprs << NUM_GPRS_shift) | @@ -405,7 +399,6 @@ fs_setup(ScrnInfoPtr pScrn, drmBufPtr ib, shader_config_t *fs_conf) void vs_setup(ScrnInfoPtr pScrn, drmBufPtr ib, shader_config_t *vs_conf) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources; sq_pgm_resources = ((vs_conf->num_gprs << NUM_GPRS_shift) | @@ -432,7 +425,6 @@ vs_setup(ScrnInfoPtr pScrn, drmBufPtr ib, shader_config_t *vs_conf) void ps_setup(ScrnInfoPtr pScrn, drmBufPtr ib, shader_config_t *ps_conf) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources; sq_pgm_resources = ((ps_conf->num_gprs << NUM_GPRS_shift) | @@ -462,7 +454,6 @@ ps_setup(ScrnInfoPtr pScrn, drmBufPtr ib, shader_config_t *ps_conf) void set_alu_consts(ScrnInfoPtr pScrn, drmBufPtr ib, int offset, int count, float *const_buf) { - RADEONInfoPtr info = RADEONPTR(pScrn); int i; const int countreg = count * (SQ_ALU_CONSTANT_offset >> 2); @@ -476,7 +467,6 @@ set_alu_consts(ScrnInfoPtr pScrn, drmBufPtr ib, int offset, int count, float *co void set_bool_consts(ScrnInfoPtr pScrn, drmBufPtr ib, int offset, uint32_t val) { - RADEONInfoPtr info = RADEONPTR(pScrn); /* bool register order is: ps, vs, gs; one register each * 1 bits per bool; 32 bools each for ps, vs, gs. */ @@ -488,7 +478,6 @@ set_bool_consts(ScrnInfoPtr pScrn, drmBufPtr ib, int offset, uint32_t val) void set_vtx_resource(ScrnInfoPtr pScrn, drmBufPtr ib, vtx_resource_t *res) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_vtx_constant_word2; sq_vtx_constant_word2 = ((((res->vb_addr) >> 32) & BASE_ADDRESS_HI_mask) | @@ -521,7 +510,6 @@ set_vtx_resource(ScrnInfoPtr pScrn, drmBufPtr ib, vtx_resource_t *res) void set_tex_resource(ScrnInfoPtr pScrn, drmBufPtr ib, tex_resource_t *tex_res) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_tex_resource_word0, sq_tex_resource_word1, sq_tex_resource_word4; uint32_t sq_tex_resource_word5, sq_tex_resource_word6; @@ -588,7 +576,6 @@ set_tex_resource(ScrnInfoPtr pScrn, drmBufPtr ib, tex_resource_t *tex_res) void set_tex_sampler (ScrnInfoPtr pScrn, drmBufPtr ib, tex_sampler_t *s) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_tex_sampler_word0, sq_tex_sampler_word1, sq_tex_sampler_word2; sq_tex_sampler_word0 = ((s->clamp_x << SQ_TEX_SAMPLER_WORD0_0__CLAMP_X_shift) | @@ -640,8 +627,6 @@ set_tex_sampler (ScrnInfoPtr pScrn, drmBufPtr ib, tex_sampler_t *s) void set_screen_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int x1, int y1, int x2, int y2) { - RADEONInfoPtr info = RADEONPTR(pScrn); - BEGIN_BATCH(6); EREG(ib, PA_SC_SCREEN_SCISSOR_TL, ((x1 << PA_SC_SCREEN_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_SCREEN_SCISSOR_TL__TL_Y_shift))); @@ -653,8 +638,6 @@ set_screen_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int x1, int y1, int x2, int void set_vport_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int id, int x1, int y1, int x2, int y2) { - RADEONInfoPtr info = RADEONPTR(pScrn); - BEGIN_BATCH(6); EREG(ib, PA_SC_VPORT_SCISSOR_0_TL + id * PA_SC_VPORT_SCISSOR_0_TL_offset, ((x1 << PA_SC_VPORT_SCISSOR_0_TL__TL_X_shift) | @@ -669,8 +652,6 @@ set_vport_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int id, int x1, int y1, int x void set_generic_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int x1, int y1, int x2, int y2) { - RADEONInfoPtr info = RADEONPTR(pScrn); - BEGIN_BATCH(6); EREG(ib, PA_SC_GENERIC_SCISSOR_TL, ((x1 << PA_SC_GENERIC_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift) | @@ -683,8 +664,6 @@ set_generic_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int x1, int y1, int x2, int void set_window_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int x1, int y1, int x2, int y2) { - RADEONInfoPtr info = RADEONPTR(pScrn); - BEGIN_BATCH(6); EREG(ib, PA_SC_WINDOW_SCISSOR_TL, ((x1 << PA_SC_WINDOW_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_WINDOW_SCISSOR_TL__TL_Y_shift) | @@ -697,8 +676,6 @@ set_window_scissor(ScrnInfoPtr pScrn, drmBufPtr ib, int x1, int y1, int x2, int void set_clip_rect(ScrnInfoPtr pScrn, drmBufPtr ib, int id, int x1, int y1, int x2, int y2) { - RADEONInfoPtr info = RADEONPTR(pScrn); - BEGIN_BATCH(6); EREG(ib, PA_SC_CLIPRECT_0_TL + id * PA_SC_CLIPRECT_0_TL_offset, ((x1 << PA_SC_CLIPRECT_0_TL__TL_X_shift) | @@ -1106,7 +1083,6 @@ set_default_state(ScrnInfoPtr pScrn, drmBufPtr ib) void draw_immd(ScrnInfoPtr pScrn, drmBufPtr ib, draw_config_t *draw_conf, uint32_t *indices) { - RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t i, count; // calculate num of packets @@ -1144,8 +1120,6 @@ draw_immd(ScrnInfoPtr pScrn, drmBufPtr ib, draw_config_t *draw_conf, uint32_t *i void draw_auto(ScrnInfoPtr pScrn, drmBufPtr ib, draw_config_t *draw_conf) { - RADEONInfoPtr info = RADEONPTR(pScrn); - BEGIN_BATCH(10); EREG(ib, VGT_PRIMITIVE_TYPE, draw_conf->prim_type); PACK3(ib, IT_INDEX_TYPE, 1); -- 1.6.5.3 _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
