summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri_drawable.c
Commit message (Collapse)AuthorAgeFilesLines
* st/dri: fix double free of dri_drawableWuZhen2016-11-011-2/+0
| | | | | | | | | | | | | | | In the callchain destroy_surface->destroyDrawable->dri_put_drawable-> dri_put_drawable->DestroyBuffer By the semantic of it, dri_destroy_buffer should not free drawable struct, all vendor specific and legacy swrast version of the function do not. wonder why no body else ran into this. NO_REF_TASK Tested: local run Change-Id: Ibe82d82d2e34b162e64bf0b8805f8a4553d362d5 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* gallium: add a pipe_context parameter to fence_finishMarek Olšák2016-08-101-1/+1
| | | | | | | | required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* st/dri: Don't call invalidate_resource for NULL depth/stencil buffersMichel Dänzer2016-01-181-2/+4
| | | | | | | Fixes crash in 4 EGL piglit tests with radeonsi. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* st/dri: Use packed RGB formatsMichel Dänzer2015-10-041-4/+4
| | | | | | | | | | Fixes Gallium based DRI drivers failing to load on big endian hosts because they can't find any matching fbconfigs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71789 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
* st/dri: expose sRGB visuals (v2)Marek Olšák2015-07-221-1/+6
| | | | | | | v2: The fix for the darkness in Ubuntu Unity is in the hunk with the 4-line comment. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/dri: Make depth buffer optional for postprocessingPark, Jeongmin2015-02-071-1/+1
| | | | | | Since only pp_jimenezmlaa uses depth buffer, we can make it optional. Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* gallium: Plumb the swap INVALIDATE_ANCILLARY flag through more layers.Eric Anholt2015-01-061-0/+6
| | | | | | | | | v2: Instead of telling the driver that the window system ancillaries have been invalidated (when the driver doesn't know which of its buffers are the window system's!), introduce a method for invalidating specific surfaces. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* st/dri: merge dri/drm and dri/sw backendsEmil Velikov2014-07-101-0/+571
| | | | | | | | | | | | | | Move the driver_name to dri2/drisw and remove all the SPLIT_TAGETS mayhem. In the next step we'll unify the dri and dri-swrast targets, completing the gallium DRI megadriver. v2: Remove leftover st/dri Makefiles from CONFIG_FILES. Spotted by Thomas Helland. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* st/dri: Move common files to common directoryJakob Bornecrantz2010-03-261-94/+0
| | | | | | | | | | | | | | | | 27 files changed, 15 insertions(+), 15 deletions(-) rename src/gallium/state_trackers/dri/{ => common}/dri1_helper.c (100%) rename src/gallium/state_trackers/dri/{ => common}/dri1_helper.h (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_context.c (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_context.h (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_drawable.c (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_drawable.h (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_extensions.c (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_screen.c (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_screen.h (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_st_api.c (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_st_api.h (100%) rename src/gallium/state_trackers/dri/{ => common}/dri_wrapper.h (100%)
* st/dri: export DRI1 surface / pipeGeorge Sapountzis2010-03-251-5/+2
| | | | They will be used by DRISW. Also, add destroy functions.
* st/dri: split out DRI2 codeGeorge Sapountzis2010-03-251-27/+0
|
* st/dri: make get_texture into validate_attGeorge Sapountzis2010-03-251-2/+5
| | | | | This is a wrapper around dri_st_framebuffer_validate for a single attachment. Also, call validate through hook to make it more generic.
* st/dri: Switch from st_public.h to st_api.h.Chia-I Wu2010-03-181-359/+19
| | | | | This is tested with demos found in progs/demos. However, only the DRI2 path is tested.
* st/dri: Headers and public symbols clean up.Chia-I Wu2010-03-181-5/+2
| | | | Remove unused headers and stop marking driDriverAPI as PUBLIC.
* st/dri: Move DRI1 bits in dri_drawable.c to dri1.c.Chia-I Wu2010-03-181-304/+2
|
* st/dri: Move DRI1 bits in dri_screen.c to dri1.c.Chia-I Wu2010-03-181-0/+1
|
* st/mesa: Implement st_api.h.Chia-I Wu2010-03-121-1/+1
| | | | | | | | There is currently no user of this new interface. As the inteface can coexist with st_public.h, everthing should work as before. ST_TEXTURE_2D is both defined by st_public.h and st_api.h. Reorder the headers in st/dri to avoid conflicts.
* Merge commit 'origin/gallium-winsys-handle-rebased'Keith Whitwell2010-03-081-2/+6
|\
| * gallium: Expose a opaque winsys handle and functions on pipe_screenJakob Bornecrantz2010-03-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | Instead of having these functions on a side interface like on drm_api create a opaque winsys_handle that is to be passed down into the winsys. Currently the only thing ported to this new interface is drm_api, and of that only the components that builds by default is ported. All the drivers and any extra state trackers needs to be ported before this can go into master.
* | dri: Rename pipe formats.José Fonseca2010-03-011-7/+7
|/
* st/dri: Assert pointer is not null before dereferencing.Vinson Lee2010-02-271-2/+4
|
* Revert "st/mesa: Make the frontbuffer visible on st_flush(PIPE_FLUSH_FRAME)."Francisco Jerez2010-02-181-2/+0
| | | | | | We probably don't want to propagate this condition to the pipe driver, this reverts commit f455ca6490fcb65781b21f81c7117bd923e250d1 and the dri_update_buffer flush altogether until an agreement is reached.
* st/dri2: Flush FRAME instead of RENDER_CACHE on buffer invalidation.Francisco Jerez2010-02-171-2/+2
|
* st/dri2: Use event-driven buffer validation.Francisco Jerez2010-02-161-0/+13
|
* st/dri, st/xorg: fix buffers that have attachements of different depthZack Rusin2010-02-121-25/+59
| | | | | | | | we actually need to specify the formats for different attachements, otherwise if the color buffer is 24bpp and the app asks for 16bpp depth buffer than we end up fetching the depth from the drawable which is 24bpp and end up creating the wrong depth buffer. use the new getBuffersWithFormat extension to pass the depth correctly.
* dri_interface: Introduce DRI tokens for the texBuffer texture formatsKristian Høgsberg2010-02-091-1/+1
| | | | | | This used to take GLX tokens, but the DRI interface can't depend on GLX defines. We fix this by introducing DRI tokens that have the same value as the GLX texture format tokens.
* gallium: fix more missing includes from various placesDave Airlie2010-02-041-0/+1
| | | | nouveau/ dri st / vmware
* st/dri: Remove unnecessary headers.Vinson Lee2010-01-281-1/+0
|
* Merge branch 'mesa_7_7_branch'Brian Paul2010-01-221-5/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
| * st/dri: update dri2 drawables when viewport is changedBen Skeggs2010-01-191-0/+8
| | | | | | | | | | | | | | Fixes gnome-shell on nouveau, as well as window resize with various other applications. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * st/dri: Add comment for intentional fallthrough in case statement.Vinson Lee2010-01-181-0/+1
| |
| * st/dri: Don't request a fake front if the server adds one automatically.Thomas Hellstrom2010-01-181-5/+7
| | | | | | | | | | | | | | We use the presence of the getBuffersWithFormat extension function to detect whether the server automatically adds a front. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
* | Merge branch 'mesa_7_7_branch'Jakob Bornecrantz2010-01-141-0/+2
|\ \ | |/ | | | | | | | | | | Conflicts: src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/util/Makefile src/gallium/drivers/r300/r300_state_derived.c
| * st/dri: Make sure we always request a fake front.Thomas Hellstrom2010-01-131-2/+1
| | | | | | | | | | | | | | | | This should be the correct, but sub-optimal way to handle things on pre-1.7 servers. For servers that automatically adds a fake front we should never request the fake front and handle the reply differently. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
| * Revert "st/dri: no need to request fake front buffer, only handle it being ↵Thomas Hellstrom2010-01-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | returned" This reverts commit 1336989ec60fff7bd590fefd28945a0e5dc536e3. The commit breaks frontbuffer rendering and the possibility to do on-demand frontbuffer requests on all Xservers prior to 1.7. The commit should be conditioned on a dri2 version check. I've submitted a patch to Xserver to bump dri2 minor, and it's acked by Ian. To be able to check the version from within the state tracker, we will probably need another dri2 extension function that returns the server version. The protocol has support for it. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
* | st/dri: update dri2 drawables when viewport is changedBen Skeggs2010-01-111-0/+8
| | | | | | | | | | | | | | Fixes gnome-shell on nouveau, as well as window resize with various other applications. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Remove leftover __DRI{screen,drawable,context}Private referencesKristian Høgsberg2010-01-041-12/+12
| | | | | | | | | | | | | | | | | | As part of the DRI driver interface rewrite I merged __DRIscreenPrivate and __DRIscreen, and likewise for __DRIdrawablePrivate and __DRIcontextPrivate. I left typedefs in place though, to avoid renaming all the *Private use internal to the driver. That was probably a mistake, and it turns out a one-line find+sed combo can do the mass rename. Better late than never.
* | Merge branch 'master' into pipe-format-simplifyMichal Krol2009-12-171-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_pipe_aaline.c src/gallium/auxiliary/draw/draw_pipe_pstipple.c src/gallium/auxiliary/util/u_blit.c src/gallium/auxiliary/util/u_gen_mipmap.c src/gallium/auxiliary/util/u_surface.c src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c src/gallium/drivers/cell/ppu/cell_texture.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/r300/r300_emit.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/softpipe/sp_texture.c src/gallium/drivers/softpipe/sp_tile_cache.c src/gallium/drivers/svga/svga_state_vs.c src/gallium/include/pipe/p_format.h src/gallium/state_trackers/dri/dri_drawable.c src/gallium/state_trackers/egl/egl_surface.c src/gallium/state_trackers/python/p_device.i src/gallium/state_trackers/python/st_softpipe_winsys.c src/gallium/state_trackers/vega/api_filters.c src/gallium/state_trackers/vega/image.c src/gallium/state_trackers/vega/mask.c src/gallium/state_trackers/vega/paint.c src/gallium/state_trackers/vega/renderer.c src/gallium/state_trackers/vega/vg_tracker.c src/gallium/state_trackers/xorg/xorg_crtc.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/state_trackers/xorg/xorg_exa.c src/gallium/state_trackers/xorg/xorg_renderer.c src/gallium/state_trackers/xorg/xorg_xv.c src/gallium/state_trackers/xorg/xvmc/surface.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_buffer.c src/gallium/winsys/egl_xlib/sw_winsys.c src/gallium/winsys/g3dvl/xlib/xsp_winsys.c src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c src/gallium/winsys/gdi/gdi_softpipe_winsys.c src/gallium/winsys/xlib/xlib_cell.c src/gallium/winsys/xlib/xlib_llvmpipe.c src/gallium/winsys/xlib/xlib_softpipe.c src/mesa/state_tracker/st_cb_fbo.c src/mesa/state_tracker/st_cb_texture.c src/mesa/state_tracker/st_texture.c
| * | fixups for interface changes (mostly state trackers)Roland Scheidegger2009-11-301-1/+0
| | |
* | | Move pf_get_block() to u_format auxiliary module.Michal Krol2009-12-031-1/+2
|/ /
* | gallium: fix more statetrackers/drivers for not using texture ↵Roland Scheidegger2009-11-261-4/+4
|/ | | | width/height/depth arrays
* gallium: Permit surface_copy and surface_fill to be NULL.Corbin Simpson2009-10-171-6/+16
| | | | | | | | | | | | | Uf. Lots of files touched. Would people with working vega, xorg, dri1, etc. please make sure you are not broken, and fix yourself up if you are. There were only two or three places where the code did not have painful fallbacks, so I would advise st maintainers to find less painful workarounds, or consider overhauling util_surface_copy and util_surface_fill. Per ymanton, darktama, and Dr_Jakob's suggestions, clear has been left as-is. I will not add PIPE_CAP_BLITTER unless it is deemed necessary.
* st/dri: Add missing front buffer case in dri_get_buffers().Michel Dänzer2009-10-071-0/+4
| | | | | | This seems to help for compiz at least with some drivers. Also add an assert(0) to catch unhandled cases in the future.
* st/dri: avoid segfault if we can't get a pixmap's buffersBen Skeggs2009-10-051-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* st/dri: no need to request fake front buffer, only handle it being returnedBen Skeggs2009-10-051-3/+0
| | | | | | | | | | | | | The previous behaviour was incorrect, and resulted in EXT_tfp being broken for DDX drivers that implement the correct behaviour (intel/radeon/nouveau). In the cases where a fake front buffer is required, the X server will return one when requesting __DRI_BUFFER_FRONT_LEFT. The Xorg state tracker (aka modesetting_drv) is likely broken now until it's modified to match the other drivers. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* st/dri: Slight consolidation of DRI2 buffer handling.Michel Dänzer2009-09-021-28/+26
| | | | | | Always use / assume a combined depth/stencil buffer. Also update drawable formats from surfaces returned by the driver.
* drm_api: Operate on textures instead of buffersJakob Bornecrantz2009-08-281-11/+2
| | | | | | | | | Most use cases just got the buffer from the texture and then called into one of the get_handle functions. Also with this patch it would be easier to move to a generic function for getting handles from textures and textures from handles, that is exposed via the screen.
* st/dri: Fix some warningsJakob Bornecrantz2009-08-281-0/+2
|
* Revert "st/xorg/dri: Pass texture formats via the DRI2 protocol flags."Jakob Bornecrantz2009-08-281-6/+10
| | | | | | This reverts commit a33e9ea3b9b7ac98d6e9bc385bbbe7eac2eb73d0. As this change breaks both radeon and nouveau
* st/dri: Make sure the front left renderbuffer is there for texture-from-pixmap.Michel Dänzer2009-08-271-0/+8
|