[Mesa-dev] [PATCH 15/18] i965: Drop region usage from DRI2 winsys-allocated buffers.
Chad Versace
chad.versace at linux.intel.com
Thu May 1 16:20:26 PDT 2014
On Thu, May 01, 2014 at 02:10:39PM -0700, Eric Anholt wrote:
> Chad Versace <chad.versace at linux.intel.com> writes:
>
> >> On Tue, Apr 29, 2014 at 4:34 PM, Eric Anholt <eric at anholt.net> wrote:
> >
> >> > - intel_region_release(&intelBuffer->region);
> >> > + drm_intel_bo_unreference(&intelBuffer->bo);
> >> > free(intelBuffer);
> >
> > This hunk passes garbage to drm_intel_bo_unreference(). Here's the GCC warning.
> >
> > intel_screen.c: In function 'intelReleaseBuffer':
> > intel_screen.c:1428:4: warning: passing argument 1 of 'drm_intel_bo_unreference' from incompatible pointer type [enabled by default]
> > drm_intel_bo_unreference(&intelBuffer->bo);
> > ^
> > In file included from brw_context.h:51:0,
> > from intel_batchbuffer.h:6,
> > from intel_screen.c:95:
> > /usr/include/libdrm/intel_bufmgr.h:123:6: note: expected 'struct drm_intel_bo *' but argument is of type 'struct drm_intel_bo **'
> > void drm_intel_bo_unreference(drm_intel_bo *bo);
> >
> > Fix that and this patch is
> > Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
>
> Thanks. I have a really weird problem where (as far as I've found), 2
> files don't produce compiler warnings for me (intel_mipmap_tree.c and
> intel_screen.c). I have no idea what's going on with it, and I've
> prodded at a bunch of command lines trying to figure it out.
If it helps, here is my `V=1 make -j4 -C src/mesa/drivers/dri/i965 |& grep -E 'intel_mipmap_tree|intel_screen'`.
/bin/sh ../../../../../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.2.0-devel\" -DPACKAGE_STRING=\"Mesa\ 10.2.0-devel\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.2.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -I. -I../../../../../include -I../../../../../src/ -I../../../../../src/mapi -I../../../../../src/mesa/ -I../../../../../src/mesa/drivers/dri/common -I../../../../../src/mesa/drivers/dri/intel/server -I../../../../../src/gtest/include -I../../../../../src/mesa/drivers/dri/common -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DHAVE_LIBUDEV -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_MINCORE -fvisibility=hidden -I/usr/include/libdrm -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -MT intel_mipmap_tree.lo -MD -MP -MF .deps/intel_mipmap_tree.Tpo -c -o intel_mipmap_tree.lo intel_mipmap_tree.c
/bin/sh ../../../../../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.2.0-devel\" -DPACKAGE_STRING=\"Mesa\ 10.2.0-devel\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.2.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -I. -I../../../../../include -I../../../../../src/ -I../../../../../src/mapi -I../../../../../src/mesa/ -I../../../../../src/mesa/drivers/dri/common -I../../../../../src/mesa/drivers/dri/intel/server -I../../../../../src/gtest/include -I../../../../../src/mesa/drivers/dri/common -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DHAVE_LIBUDEV -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_MINCORE -fvisibility=hidden -I/usr/include/libdrm -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -MT intel_screen.lo -MD -MP -MF .deps/intel_screen.Tpo -c -o intel_screen.lo intel_screen.c
libtool: compile: gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.2.0-devel\" "-DPACKAGE_STRING=\"Mesa 10.2.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.2.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -I. -I../../../../../include -I../../../../../src/ -I../../../../../src/mapi -I../../../../../src/mesa/ -I../../../../../src/mesa/drivers/dri/common -I../../../../../src/mesa/drivers/dri/intel/server -I../../../../../src/gtest/include -I../../../../../src/mesa/drivers/dri/common -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DHAVE_LIBUDEV -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_MINCORE -fvisibility=hidden -I/usr/include/libdrm -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -MT intel_mipmap_tree.lo -MD -MP -MF .deps/intel_mipmap_tree.Tpo -c intel_mipmap_tree.c -fPIC -DPIC -o .libs/intel_mipmap_tree.o
mv -f .deps/intel_mipmap_tree.Tpo .deps/intel_mipmap_tree.Plo
libtool: compile: gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.2.0-devel\" "-DPACKAGE_STRING=\"Mesa 10.2.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.2.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -I. -I../../../../../include -I../../../../../src/ -I../../../../../src/mapi -I../../../../../src/mesa/ -I../../../../../src/mesa/drivers/dri/common -I../../../../../src/mesa/drivers/dri/intel/server -I../../../../../src/gtest/include -I../../../../../src/mesa/drivers/dri/common -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DHAVE_LIBUDEV -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_MINCORE -fvisibility=hidden -I/usr/include/libdrm -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -MT intel_screen.lo -MD -MP -MF .deps/intel_screen.Tpo -c intel_screen.c -fPIC -DPIC -o .libs/intel_screen.o
intel_screen.c: In function 'intelReleaseBuffer':
intel_screen.c:1428:4: warning: passing argument 1 of 'drm_intel_bo_unreference' from incompatible pointer type [enabled by default]
from intel_screen.c:95:
mv -f .deps/intel_screen.Tpo .deps/intel_screen.Plo
/bin/sh ../../../../../libtool --tag=CXX --mode=link g++ -I../../../../../include -I../../../../../src/ -I../../../../../src/mapi -I../../../../../src/mesa/ -I../../../../../src/mesa/drivers/dri/common -I../../../../../src/mesa/drivers/dri/intel/server -I../../../../../src/gtest/include -I../../../../../src/mesa/drivers/dri/common -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DHAVE_LIBUDEV -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_MINCORE -fvisibility=hidden -I/usr/include/libdrm -g -O2 -Wall -fno-strict-aliasing -fno-builtin-memcmp -o libi965_dri.la intel_batchbuffer.lo intel_blit.lo intel_buffer_objects.lo intel_buffers.lo intel_debug.lo intel_extensions.lo intel_fbo.lo intel_mipmap_tree.lo intel_resolve_map.lo intel_screen.lo intel_pixel.lo intel_pixel_bitmap.lo intel_pixel_copy.lo intel_pixel_draw.lo intel_pixel_read.lo intel_state.lo intel_syncobj.lo intel_tex.lo intel_tex_copy.lo intel_tex_image.lo intel_tex_subimage.lo intel_tex_validate.lo intel_upload.lo brw_binding_tables.lo brw_blorp.lo brw_blorp_blit.lo brw_blorp_blit_eu.lo brw_blorp_clear.lo brw_cc.lo brw_cfg.lo brw_clear.lo brw_clip.lo brw_clip_line.lo brw_clip_point.lo brw_clip_state.lo brw_clip_tri.lo brw_clip_unfilled.lo brw_clip_util.lo brw_context.lo brw_cubemap_normalize.lo brw_curbe.lo brw_dead_control_flow.lo brw_device_info.lo brw_disasm.lo brw_draw.lo brw_draw_upload.lo brw_eu.lo brw_eu_compact.lo brw_eu_emit.lo brw_eu_util.lo brw_fs.lo brw_fs_channel_expressions.lo brw_fs_copy_propagation.lo brw_fs_cse.lo brw_fs_dead_code_eliminate.lo brw_fs_fp.lo brw_fs_generator.lo brw_fs_live_variables.lo brw_fs_peephole_predicated_break.lo brw_fs_reg_allocate.lo brw_fs_register_coalesce.lo brw_fs_saturate_propagation.lo brw_fs_sel_peephole.lo brw_fs_vector_splitting.lo brw_fs_visitor.lo brw_gs.lo brw_gs_emit.lo brw_gs_state.lo brw_gs_surface_state.lo brw_interpolation_map.lo brw_lower_texture_gradients.lo brw_lower_unnormalized_offset.lo brw_meta_updownsample.lo brw_misc_state.lo brw_object_purgeable.lo brw_performance_monitor.lo brw_program.lo brw_primitive_restart.lo brw_queryobj.lo brw_reset.lo brw_schedule_instructions.lo brw_sf.lo brw_sf_emit.lo brw_sf_state.lo brw_shader.lo brw_state_batch.lo brw_state_cache.lo brw_state_dump.lo brw_state_upload.lo brw_surface_formats.lo brw_tex.lo brw_tex_layout.lo brw_urb.lo brw_util.lo brw_vec4.lo brw_vec4_copy_propagation.lo brw_vec4_generator.lo brw_vec4_gs.lo brw_vec4_gs_visitor.lo brw_vec4_live_variables.lo brw_vec4_reg_allocate.lo brw_vec4_visitor.lo brw_vec4_vp.lo brw_vec4_vs_visitor.lo brw_vs.lo brw_vs_state.lo brw_vs_surface_state.lo brw_wm.lo brw_wm_iz.lo brw_wm_sampler_state.lo brw_wm_state.lo brw_wm_surface_state.lo gen6_blorp.lo gen6_cc.lo gen6_clip_state.lo gen6_depthstencil.lo gen6_gs_state.lo gen6_multisample_state.lo gen6_queryobj.lo gen6_sampler_state.lo gen6_scissor_state.lo gen6_sf_state.lo gen6_sol.lo gen6_urb.lo gen6_viewport_state.lo gen6_vs_state.lo gen6_wm_state.lo gen7_blorp.lo gen7_disable.lo gen7_gs_state.lo gen7_misc_state.lo gen7_sampler_state.lo gen7_sf_state.lo gen7_sol_state.lo gen7_urb.lo gen7_viewport_state.lo gen7_vs_state.lo gen7_wm_state.lo gen7_wm_surface_state.lo gen8_blend_state.lo gen8_disasm.lo gen8_depth_state.lo gen8_disable.lo gen8_draw_upload.lo gen8_fs_generator.lo gen8_generator.lo gen8_instruction.lo gen8_gs_state.lo gen8_misc_state.lo gen8_multisample_state.lo gen8_sf_state.lo gen8_sol_state.lo gen8_surface_state.lo gen8_vec4_generator.lo gen8_viewport_state.lo gen8_vs_state.lo gen8_wm_depth_stencil.lo gen8_ps_state.lo -ldrm_intel -ldrm
libtool: link: ar cru .libs/libi965_dri.a .libs/intel_batchbuffer.o .libs/intel_blit.o .libs/intel_buffer_objects.o .libs/intel_buffers.o .libs/intel_debug.o .libs/intel_extensions.o .libs/intel_fbo.o .libs/intel_mipmap_tree.o .libs/intel_resolve_map.o .libs/intel_screen.o .libs/intel_pixel.o .libs/intel_pixel_bitmap.o .libs/intel_pixel_copy.o .libs/intel_pixel_draw.o .libs/intel_pixel_read.o .libs/intel_state.o .libs/intel_syncobj.o .libs/intel_tex.o .libs/intel_tex_copy.o .libs/intel_tex_image.o .libs/intel_tex_subimage.o .libs/intel_tex_validate.o .libs/intel_upload.o .libs/brw_binding_tables.o .libs/brw_blorp.o .libs/brw_blorp_blit.o .libs/brw_blorp_blit_eu.o .libs/brw_blorp_clear.o .libs/brw_cc.o .libs/brw_cfg.o .libs/brw_clear.o .libs/brw_clip.o .libs/brw_clip_line.o .libs/brw_clip_point.o .libs/brw_clip_state.o .libs/brw_clip_tri.o .libs/brw_clip_unfilled.o .libs/brw_clip_util.o .libs/brw_context.o .libs/brw_cubemap_normalize.o .libs/brw_curbe.o .libs/brw_dead_control_flow.o .libs/brw_device_info.o .libs/brw_disasm.o .libs/brw_draw.o .libs/brw_draw_upload.o .libs/brw_eu.o .libs/brw_eu_compact.o .libs/brw_eu_emit.o .libs/brw_eu_util.o .libs/brw_fs.o .libs/brw_fs_channel_expressions.o .libs/brw_fs_copy_propagation.o .libs/brw_fs_cse.o .libs/brw_fs_dead_code_eliminate.o .libs/brw_fs_fp.o .libs/brw_fs_generator.o .libs/brw_fs_live_variables.o .libs/brw_fs_peephole_predicated_break.o .libs/brw_fs_reg_allocate.o .libs/brw_fs_register_coalesce.o .libs/brw_fs_saturate_propagation.o .libs/brw_fs_sel_peephole.o .libs/brw_fs_vector_splitting.o .libs/brw_fs_visitor.o .libs/brw_gs.o .libs/brw_gs_emit.o .libs/brw_gs_state.o .libs/brw_gs_surface_state.o .libs/brw_interpolation_map.o .libs/brw_lower_texture_gradients.o .libs/brw_lower_unnormalized_offset.o .libs/brw_meta_updownsample.o .libs/brw_misc_state.o .libs/brw_object_purgeable.o .libs/brw_performance_monitor.o .libs/brw_program.o .libs/brw_primitive_restart.o .libs/brw_queryobj.o .libs/brw_reset.o .libs/brw_schedule_instructions.o .libs/brw_sf.o .libs/brw_sf_emit.o .libs/brw_sf_state.o .libs/brw_shader.o .libs/brw_state_batch.o .libs/brw_state_cache.o .libs/brw_state_dump.o .libs/brw_state_upload.o .libs/brw_surface_formats.o .libs/brw_tex.o .libs/brw_tex_layout.o .libs/brw_urb.o .libs/brw_util.o .libs/brw_vec4.o .libs/brw_vec4_copy_propagation.o .libs/brw_vec4_generator.o .libs/brw_vec4_gs.o .libs/brw_vec4_gs_visitor.o .libs/brw_vec4_live_variables.o .libs/brw_vec4_reg_allocate.o .libs/brw_vec4_visitor.o .libs/brw_vec4_vp.o .libs/brw_vec4_vs_visitor.o .libs/brw_vs.o .libs/brw_vs_state.o .libs/brw_vs_surface_state.o .libs/brw_wm.o .libs/brw_wm_iz.o .libs/brw_wm_sampler_state.o .libs/brw_wm_state.o .libs/brw_wm_surface_state.o .libs/gen6_blorp.o .libs/gen6_cc.o .libs/gen6_clip_state.o .libs/gen6_depthstencil.o .libs/gen6_gs_state.o .libs/gen6_multisample_state.o .libs/gen6_queryobj.o .libs/gen6_sampler_state.o .libs/gen6_scissor_state.o .libs/gen6_sf_state.o .libs/gen6_sol.o .libs/gen6_urb.o .libs/gen6_viewport_state.o .libs/gen6_vs_state.o .libs/gen6_wm_state.o .libs/gen7_blorp.o .libs/gen7_disable.o .libs/gen7_gs_state.o .libs/gen7_misc_state.o .libs/gen7_sampler_state.o .libs/gen7_sf_state.o .libs/gen7_sol_state.o .libs/gen7_urb.o .libs/gen7_viewport_state.o .libs/gen7_vs_state.o .libs/gen7_wm_state.o .libs/gen7_wm_surface_state.o .libs/gen8_blend_state.o .libs/gen8_disasm.o .libs/gen8_depth_state.o .libs/gen8_disable.o .libs/gen8_draw_upload.o .libs/gen8_fs_generator.o .libs/gen8_generator.o .libs/gen8_instruction.o .libs/gen8_gs_state.o .libs/gen8_misc_state.o .libs/gen8_multisample_state.o .libs/gen8_sf_state.o .libs/gen8_sol_state.o .libs/gen8_surface_state.o .libs/gen8_vec4_generator.o .libs/gen8_viewport_state.o .libs/gen8_vs_state.o .libs/gen8_wm_depth_stencil.o .libs/gen8_ps_state.o
More information about the mesa-dev
mailing list