mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
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 <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
c9bd1399a1
commit
92e7c93d2f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user