summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/galahad
AgeCommit message (Collapse)AuthorFilesLines
2014-03-07gallium: allow setting of the internal stream output offsetZack Rusin1-2/+2
D3D10 allows setting of the internal offset of a buffer, which is in general only incremented via actual stream output writes. By allowing setting of the internal offset draw_auto is capable of rendering from buffers which have not been actually streamed out to. Our interface didn't allow. This change functionally shouldn't make any difference to OpenGL where instead of an append_bitmask you just get a real array where -1 means append (like in D3D) and 0 means do not append. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-12-13swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie1-2/+3
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 <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> swrast: add support for copy_sub_buffer
2013-11-28gallium/drivers: support more sampler views than samplers for more driversRoland Scheidegger1-1/+1
This adds support for this to more drivers, in particular for all the "special" ones useful for debugging. HW drivers are left alone, some should be able to support it if they want but they may not be interested at this point. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-11-16gallium/drivers: compact compiler flags into Automake.incEmil Velikov1-3/+1
* minimise flags duplication * distingush between VISIBILITY C and CXX flags * set only required flags - C and/or CXX v2: add LLVM_CFLAGS back to AM_CFLAGS (add missing backslash) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-10-23gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul1-53/+4
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 <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-10-03galahad: remove old bind_*_sampler_states() functionsBrian Paul1-50/+1
2013-10-03galahad: implement pipe_context::bind_sampler_states()Brian Paul1-12/+18
2013-10-01galahad: consolidate C sources list into Makefile.sourcesEmil Velikov3-5/+22
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-09-20gallium: add flush_resource context functionMarek Olšák1-0/+13
r600g needs explicit flushing before DRI2 buffers are presented on the screen. v2: add (stub) implementations for all drivers, fix frontbuffer flushing v3: fix galahad Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2013-06-18gallium: add condition parameter to render_conditionRoland Scheidegger1-1/+2
For conditional rendering this makes it possible to skip rendering if either the predicate is true or false, as supported by d3d10 (in fact previously it was sort of implied skip rendering if predicate is false for occlusion predicate, and true for so_overflow predicate). There's no cap bit for this as presumably all drivers could do it trivially (but this patch does not implement it for the drivers using true hw predicates, nvxx, r600, radeonsi, no change is expected for OpenGL functionality). Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-25gallium: Add support for multiple viewportsZack Rusin1-8/+12
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 <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-04gallium: fix type of flags in pipe_context::flush()Chia-I Wu1-1/+1
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> [olv: document the parameter now that the type is unsigned]
2013-01-04gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák1-3/+3
Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2012-12-20gallium: s/PIPE_CAP_TIMER_QUERY/PIPE_CAP_QUERY_TIME_ELAPSED/José Fonseca1-1/+1
To better reflect what it is being advertised. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-09galahad: Support geometry shader / stream-output methods.José Fonseca1-82/+110
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-05galahad: Prevent segfault when passing NULL to set_vertex_buffers.José Fonseca1-1/+1
State tracker now passes NULL buffer array to unbind buffers.
2012-10-31gallium: add start_slot parameter to set_vertex_buffersMarek Olšák1-2/+2
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 <brianp@vmware.com>
2012-10-12galahad: galahad_context_blitJosé Fonseca1-11/+15
must unwrap.
2012-10-11gallium: unify transfer functionsMarek Olšák2-47/+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 <brianp@vmware.com>
2012-09-30gallium: remove resource_resolveMarek Olšák1-1/+0
The functionality is provided by the new blit function. Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-30gallium: implement blit in driver wrappersMarek Olšák1-0/+26
Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-16galahad: add 'start' parameter to bind_sampler_states/views()Brian Paul1-41/+57
2012-08-16gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #defineBrian Paul1-4/+4
PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS were all defined to the same value (16). In various places we're creating arrays such as sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming the same number of max samplers for all shader stages anyway. Of course, drivers are still free to advertise different numbers of max samplers for different shaders.
2012-07-10galahad: implement get_timestampMarek Olšák1-0/+10
2012-07-06galahad: Check that texture format is supported.José Fonseca1-0/+7
2012-07-06galahad: More detailed resource checks.José Fonseca2-19/+64
2012-07-06galahad: Fix zealous warnings.José Fonseca1-6/+10
2012-07-06galahad: Enumerate all methods that are missing.José Fonseca2-24/+49
2012-07-06galahad: Implement render_condition.José Fonseca1-1/+13
2012-07-06galahad: Don't implement context methods that are not implemented by the ↵José Fonseca1-104/+115
underlying pipe driver.
2012-07-06galahad: Use debug_printf.José Fonseca1-3/+5
stderr is not visible on windows.
2012-07-06galahad: Silence creation messages.José Fonseca2-4/+0
Let galahad warnings be true warnings.
2012-07-06galahad: Use reference counting when destroying the wraped objects.José Fonseca1-3/+2
As the wrapped pipe driver may hold internal references.
2012-07-06galahad: Point to the galahad objects from the galahad sampler view.José Fonseca1-2/+2
And not the wraped driver's objects.
2012-07-06galahad: Don't defer index buffer when it's NULL.José Fonseca1-16/+16
2012-05-12gallium: remove user_buffer_create from the interfaceMarek Olšák1-23/+0
Nothing uses it now.
2012-04-30gallium: remove pipe_context::redefine_user_bufferMarek Olšák1-14/+0
2012-04-30gallium: change set_constant_buffer to be UBO-friendlyMarek Olšák1-7/+6
2012-03-30gallium: adapt to get_query_result interface changeMarek Olšák1-1/+1
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-14galahad: Use non-recursive automakeTom Stellard1-14/+0
2012-03-14gallium/drivers: Use automake to generate makefileTom Stellard1-0/+3
2012-02-21gallium: remove unused winsys pointers in pipe_screen and pipe_contextMarek Olšák2-3/+0
A winsys is already a private object of a driver.
2011-11-22gallium: separate out floating-point CAPs into its own enumMarek Olšák1-1/+1
The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
2011-09-18gallium: move clear paths from rgba to a pointer to a color union (v2)Dave Airlie1-4/+4
This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values. Notes: 1. the value is opaque. 2. only when the value is used should it be interpretered according to the surface format it is going to be used with. 3. float clears on integer buffers and vice-versa are undefined. v2: fixed up vega and graw, dropped hunks that shouldn't have been in patch. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-21galahad,util: warn on resource target mismatch in copy_regionMarek Olšák1-0/+6
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-03-11gallium: remove flags from the flush functionMarek Olšák1-2/+0
The drivers have been changed so that they behave as if all of the flags were set. This is already implicit in most hardware drivers and required for multiple contexts. Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag to decide whether flush_frontbuffer should be called. New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
2011-03-11gallium: remove the geom_flags param from is_format_supportedMarek Olšák1-4/+2
2011-03-11gallium: cleanup fence_signalled and fence_finishMarek Olšák1-8/+4
So that they don't have the driver-specific param and return type.
2011-03-11gallium: kill is_resource_referencedMarek Olšák1-18/+0
Only st/xorg used it and even incorrectly with regards to pipelined transfers.
2011-03-08gallium: add timeout parameter to fence_finishMarek Olšák1-2/+4
This is a follow-up to the ARB_sync patch for st/mesa and completes the ARB_sync implementation.