summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
Commit message (Collapse)AuthorAgeFilesLines
* swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie2013-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]> swrast: add support for copy_sub_buffer
* vl: use a separate context for shader based decode v2Christian König2013-11-082-61/+124
| | | | | | | | This makes VDPAU thread save again. v2: fix some memory leaks reported by Aaron Watry. Signed-off-by: Christian König <[email protected]>
* gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul2013-10-237-8/+18
| | | | | | | | | | | | The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
* vl: remove old bind_fragment_sampler_states() callsBrian Paul2013-10-037-47/+17
|
* vl: use pipe_context::bind_sampler_states() if non-nullBrian Paul2013-10-037-8/+49
|
* gallium: include u_surface.h instead of u_rect.hBrian Paul2013-09-301-1/+1
| | | | | | | | u_rect.h was including u_surface.h just to avoid touching a bunch of other source files after some functions were moved from u_rect.h to u_surface.h. This patch cleans up that hack. Reviewed-by: Roland Scheidegger <[email protected]>
* vl/mpeg12: use new vlc function to search for start codesChristian König2013-09-251-1/+1
| | | | Signed-off-by: Christian König <[email protected]>
* vl/vlc: add fast forward search for byte valueChristian König2013-09-251-10/+74
| | | | | | | Commonly used to find start codes and has far less overhead to searching manually. Signed-off-by: Christian König <[email protected]>
* vl/buffers: consistent use on VL_MAX_SURFACESEmil Velikov2013-08-191-3/+3
| | | | | Reviewed-by: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* vl/idct: cleanup all idct buffersEmil Velikov2013-08-191-1/+1
| | | | | | | | Code should loop through and cleanup the three (VL_NUM_COMPONENTS) idct buffers, rather than doing the first one three times. Reviewed-by: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* vl/buffer: add sanity check after CALLOC_STRUCTEmil Velikov2013-08-191-0/+2
| | | | | | | Check if we have successfully allocated memory. Reviewed-by: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* vdpau/vl 422 chroma width/height mix upAndy Furniss2013-08-192-3/+3
| | | | | | | | | | | | | | | I was looking into some minor 422 issues/discrepencies I noticed long ago using vdpau on my rv790. I noticed that there is code that is halving height rather than width - 422 is full height AFAIK. Making the changes below doesn't actually make any noticable difference to what I was looking into. Maybe there are more but here's three I've found so far Reviewed-by: Christian König <[email protected]>
* vl: add entrypoint to is_video_format_supportedChristian König2013-08-192-2/+4
| | | | Signed-off-by: Christian König <[email protected]>
* vl: add entrypoint to get_video_paramChristian König2013-08-193-2/+6
| | | | Signed-off-by: Christian König <[email protected]>
* vl: rename pipe_video_decoder to pipe_video_codecChristian König2013-08-199-32/+32
| | | | Signed-off-by: Christian König <[email protected]>
* vl: rename enum pipe_video_codec to pipe_video_formatChristian König2013-08-193-5/+5
| | | | Signed-off-by: Christian König <[email protected]>
* vl: use a template for create_video_decoderChristian König2013-08-194-41/+19
| | | | Signed-off-by: Christian König <[email protected]>
* vl: Add support for max level query v2Rico Schüller2013-08-142-0/+21
| | | | | | | | | This patch adds the level query support to the video decoders and uses some more reasonable defaults. v2: (ck) add commit message Reviewed-by: Christian König <[email protected]>
* gallium/vl: add prime supportDave Airlie2013-07-261-1/+19
| | | | | | | | | | | | | | | | This fixes the dri2 opening to check if DRI_PRIME is set, and picks the correct drm device path to open, this along with a change to libvdpau allows vdpauinfo to work at least, Martin Peres tested with nouveau, and there seems to be a further issue with final displaying, it only works sometimes, but this patch is at least necessary to help debug further. Signed-off-by: Dave Airlie <[email protected]> Cc: [email protected] Reviewed-by: Christian König <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67283 Tested-by: Armin K. <[email protected]>
* tgsi: rename the TGSI fragment kill opcodesBrian Paul2013-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional kill (if any src component < 0). The later was unconditional kill. At one time KILP was supposed to work with NV-style condition codes/predicates but we never had that in TGSI. This patch renames both opcodes: TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0) TGSI_OPCODE_KILP -> KILL (unconditional kill) Note: I didn't just transpose the opcode names to help ensure that I didn't miss updating any code anywhere. I believe I've updated all the relevant code and comments but I'm not 100% sure that some drivers had this right in the first place. For example, the radeon driver might have llvm.AMDGPU.kill and llvm.AMDGPU.kilp mixed up. Driver authors should review their code. Reviewed-by: Jose Fonseca <[email protected]>
* vl/mpeg12: handle mpeg-1 bitstreams more correctlyMaarten Lankhorst2013-06-261-5/+16
| | | | | Add support for D-frames. Add support for slices ending on a different horizontal row of macroblocks.
* vl/mpeg12: fix mpeg-1 bytestream parsingMaarten Lankhorst2013-06-221-6/+24
| | | | | | | | | | | This fixes the bytestream parsing of mpeg-1 stream, but still leaves open a number of issues with the interpretation: - IDCT mismatch control is not correct for MPEG-1. - Slices do not have to start and end on the same horizontal row of macroblocks. - picture_coding_type = 4 (D-pictures) is not handled. - full_pel_*_vector is not handled. Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium: Add support for multiple viewportsZack Rusin2013-05-256-8/+8
| | | | | | | | | | | | Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca<[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* vl/idct: fix for commit 7d2f2a0c890b1993532a45c8c392c28950ddc06eChristian König2013-05-033-16/+21
| | | | | | | | We still need the option for handling 3D textures as well. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=64143 Signed-off-by: Christian König <[email protected]>
* vl/buffers: fix typo in function nameChristian König2013-05-032-13/+13
| | | | Signed-off-by: Christian König <[email protected]>
* vl/buffer: use 2D_ARRAY instead of 3D texturesChristian König2013-05-013-20/+22
| | | | Signed-off-by: Christian König <[email protected]>
* vl/compositor: cleanup background clearingChristian König2013-05-012-4/+6
| | | | | | Add an extra parameter to specify if we should clear the render target. Signed-off-by: Christian König <[email protected]>
* gallium: Replace gl_rasterization_rules with lower_left_origin and ↵José Fonseca2013-04-236-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | half_pixel_center. Squashed commit of the following: commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:37:18 2013 +0100 gallium: s/lower_left_origin/bottom_edge_rule/ commit 4dff4f64fa83b9737def136fffd161d55e4f1722 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:35:04 2013 +0100 gallium: Move diagram to docs. commit 442a63012c8c3c3797f45e03f2ca20ad5f399832 Author: James Benton <[email protected]> Date: Fri May 11 17:50:55 2012 +0100 gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center. This change is necessary to achieve correct results when using OpenGL FBOs. Reviewed-by: Marek Olšák <[email protected]>
* vl: Fix off-by-one error in device_name_length allocation.Vinson Lee2013-02-231-2/+1
| | | | | | | | Fixes out-of-bounds write reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* vl: round next_msc to integer frame, and kill skew_mscMaarten Lankhorst2013-01-211-5/+2
| | | | | | | | This reduces jitter slightly in a cleaner way, without desynchronizing mplayer2 as badly when falling behind. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/video_buffer: fix up surface ordering for the interlaced caseMaarten Lankhorst2013-01-161-6/+6
| | | | | | | | It seems the other code expects surface[0..1] to be the luma field in interlaced case. See for example vdpau/surface.c vlVdpVideoSurfaceClear and vlVdpVideoSurfacePutBitsYCbCr. Signed-off-by: Maarten Lankhorst <[email protected]>
* vl/compositor: fix weave shader bugsMaarten Lankhorst2013-01-161-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writemask was XY instead of YZ (thanks to calim for spotting it). The pixel calculation resulted in the pixel always being off by one. If y was .5: y' = round(y) + 0.5 = 1.5 Fixing this also means the LRP function has to swap the pixels it, since it's now the other way around for top/bottom. WIth these fixes only chroma for top and bottom pixel rows are wrongly interpolated in my test program: --- nvidia +++ nouveau @@ -1,4 +1,4 @@ -YCbCr[0] = 00c080 +YCbCr[0] = 00b070 YCbCr[1] = 00b070 YCbCr[2] = 029050 YCbCr[3] = 207050 @@ -61,4 +61,4 @@ YCbCr[60] = 0c5070 YCbCr[61] = c05090 YCbCr[62] = 0e70b0 -YCbCr[63] = e080c0 +YCbCr[63] = e070b0 Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-122-3/+0
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-314-6/+6
| | | | | | | | | | | | | | | | | | | | | This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <[email protected]>
* vl: fix the dri winsys helper screen initChristian König2012-10-261-0/+2
| | | | Signed-off-by: Christian König <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-113-58/+22
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* vl: Initialize pipe_vertex_buffer.user_buffer fields.Vinson Lee2012-05-141-0/+4
| | | | | | | Fix uninitialized scalar variable defects reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallium: change set_constant_buffer to be UBO-friendlyMarek Olšák2012-04-301-1/+1
|
* vl: move winsys helper out of winsys directoryChristian König2012-03-283-0/+639
| | | | | | | | | They aren't winsys of their own, just help dealing with them. v2: add some more comments in vl_winsys.h Signed-off-by: Christian König <[email protected]>
* vl/mpeg12: make bitstream decoder more robustChristian König2012-03-092-1/+2
| | | | | | Just another xine workaround. Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: add YUYV and UYVY supportChristian König2012-03-091-16/+59
| | | | | | | | | | This gets xine working with VDPAU. v2: some minor bugfixes. v3: create the resource with the subsampled format to avoid tilling problems Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: add YUVA and VUYA supportChristian König2012-03-081-0/+20
| | | | Signed-off-by: Christian König <[email protected]>
* vl: fix shader in/out numberingChristian König2012-03-035-10/+10
| | | | | | Fix all the other wrong numberings. Signed-off-by: Christian König <[email protected]>
* vl/compositor: fix shader in/out numberingChristian König2012-03-021-5/+5
| | | | | | | Michel pointed out that my assumption of a global index namespace is incorrect and breaks r300g. Signed-off-by: Christian König <[email protected]>
* vl/csc: simplify matrix handlingChristian König2012-03-024-69/+64
| | | | | | A csc matrix is only 4x3 not 4x4, also define a VDPAU compatible type for it. Signed-off-by: Christian König <[email protected]>
* vl/compositor: add support for per layer dst areasChristian König2012-03-022-39/+45
| | | | Signed-off-by: Christian König <[email protected]>
* vl/compositor: add per vertex color suportChristian König2012-03-022-31/+84
| | | | | | Used in subtitles, for example. Signed-off-by: Christian König <[email protected]>
* vl/compositor: replace pipe_video_rect with u_rectChristian König2012-03-022-31/+31
| | | | | | So we support things like flipping also. Signed-off-by: Christian König <[email protected]>
* vl/compositor: split shaders and stateChristian König2012-03-022-163/+240
| | | | Signed-off-by: Christian König <[email protected]>
* vl: adjust matrix and median filter to removal of PIPE_SHADER_CAP_OUTPUT_READChristian König2012-02-272-9/+12
| | | | Signed-off-by: Christian König <[email protected]>