Commit 92e7c93d authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer

Move scrn/info declaration inside USE_GLAMOR in amdgpu_dri3_fd_from_pixmap

Fixes warning when building with --disable-glamor:

../../src/amdgpu_dri3.c: In function 'amdgpu_dri3_fd_from_pixmap':
../../src/amdgpu_dri3.c:135:16: warning: unused variable 'info' [-Wunused-variable]
  AMDGPUInfoPtr info = AMDGPUPTR(scrn);
                ^
Reported-by: Jammy Zhou's avatarJammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c9bd1399
......@@ -131,13 +131,13 @@ static int amdgpu_dri3_fd_from_pixmap(ScreenPtr screen,
CARD16 *stride,
CARD32 *size)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
struct amdgpu_buffer *bo;
struct amdgpu_bo_info bo_info;
uint32_t fd;
#ifdef USE_GLAMOR
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
if (info->use_glamor)
return glamor_fd_from_pixmap(screen, pixmap, stride, size);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment