aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/postprocess/pp_run.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add pipe cap for scissored clears and pass scissor state to clear() ↵Mike Blumenkrantz2020-04-291-1/+1
| | | | | | | | | | | | | | | | hook this adds a new pipe cap that drivers can support which enables passing buffer clears with scissor test enabled through to be handled by the driver instead of having mesa draw a quad also adjust all existing clear() hooks to have the new parameter Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4310>
* gallium: pass cso_velems_state into cso_context instead of pipe_vertex_elementMarek Olšák2020-02-281-1/+1
| | | | | | | This removes one memcpy from the CSO hashing code. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* gallium: refactor pipe_shader_state to support multiple IR'sRob Clark2016-05-111-2/+1
| | | | | | | | | | | | | | | | The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it requested. The pipe drivers will always have to support TGSI (and convert that into whatever it is that they prefer), but in some cases we should be able to skip the TGSI intermediate step (such as glsl->nir vs glsl->tgsi->nir). I think pipe_compute_state should get similar treatment. Currently, afaict, it has one user and one consumer, which has allowed it to be sloppy wrt. supporting alternative IR's. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: pause queries for all meta opsMarek Olšák2016-04-121-0/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* postprocess: use new cso_save/restore_state() functionsBrian Paul2016-02-161-38/+20
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium/auxiliary: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-061-1/+1
| | | | | | | | | | Use NULL tests of the form `if (ptr)' or `if (!ptr)'. They do not depend on the definition of the symbol NULL. Further, they provide the opportunity for the accidental assignment, are clear and succinct. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* cso: only allow saving and restoring fragment sampler statesMarek Olšák2015-07-221-2/+2
|
* cso: only allow saving and restoring fragment sampler viewsMarek Olšák2015-07-221-2/+2
| | | | Not needed for other shader stages.
* gallium: disable tessellation shaders for meta opsMarek Olšák2015-05-161-0/+6
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/st: add support for ARB_sample_shadingIlia Mirkin2014-04-261-0/+3
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: allow setting of the internal stream output offsetZack Rusin2014-03-071-1/+1
| | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: allow choosing which colorbuffers to clearMarek Olšák2013-12-121-1/+1
| | | | | | | | | | | | | | Required for glClearBuffer, which only clears one colorbuffer attachment. Example: If the first colorbuffer is float and the second one is int: pipe->clear(pipe, PIPE_CLEAR_COLOR0, float_clear_color, ...); pipe->clear(pipe, PIPE_CLEAR_COLOR1, int_clear_color, ...); This doesn't need any driver changes yet, because all drivers just use: if (flags & PIPE_CLEAR_COLOR) .. The drivers which support GL 3.0 will have to implement it properly though.
* postprocess: refactor header files, etcBrian Paul2013-11-181-1/+3
| | | | | | | | | Move private data structures and function prototypes out of the public postprocess.h header file. Create a pp_private.h for the shared, private data structures, functions. Remove pp_program.h header. Reviewed-by: Marek Olšák <[email protected]>
* postprocess: rename program to pp_programBrian Paul2013-11-181-7/+7
| | | | | | To match the pp_ namespace convention. Reviewed-by: Marek Olšák <[email protected]>
* gallium/postprocessing: convert blits to pipe->blitMarek Olšák2013-07-301-5/+43
| | | | | | | | | PP saves current states to cso_context and then util_blit_pixels does the same. cso_context doesn't like that and the original state is not correctly restored. Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* gallium/postprocessing: fix shader parsingMarek Olšák2013-07-301-2/+2
| | | | | | | | | | tokens was converted to a pointer, which made the Elements macro return 1. Broken by e87fc11cac696881469a57955af2ac7b4929a2c7. Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* postprocess: move second temporary assertion into isolated configurationMatthew McClure2013-07-031-2/+2
| | | | | | | | | With this patch we will only assert that the second temporary is allocated, when there are more than two active filters. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66423 Signed-off-by: Brian Paul <[email protected]>
* postprocess: handle partial intialization failures.Matthew McClure2013-06-271-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes segfaults observed when enabling the post processing features. When the format is not supported, or a texture cannot be created, the code must gracefully handle failure and report the error to the calling code for proper failure handling. To accomplish this the following changes were made to the filters.h prototypes: - bool return for pp_init_func - Added pp_free_func for filter specific resource destruction Fixes segfaults from backtraces: * util_destroy_blit pp_free * u_transfer_inline_write_vtbl pp_jimenezmlaa_init_run pp_init This patch also uses tgsi_alloc_tokens to allocate temporary tokens in pp_tgsi_to_state, instead of allocating the array on the stack. This fixes the following stack corruption segfault in pp_run.c: * _int_free aaline_delete_fs_state pp_free Bug Number: 1021843 Reviewed-by: Brian Paul <[email protected]>
* gallium: add condition parameter to render_conditionRoland Scheidegger2013-06-181-1/+1
| | | | | | | | | | | | | 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 <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* cso: add constant buffer save/restore feature for postprocessingMarek Olšák2013-03-261-0/+4
| | | | | Postprocessing is an internal meta op and should restore the states it changes.
* gallium: remove pipe_surface::usageMarek Olšák2012-12-121-1/+0
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
* gallium: manage render condition in cso_context and fix postprocessing w/ itMarek Olšák2012-12-121-0/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/postprocess: share pipe_context and cso_context with the state trackerMarek Olšák2012-11-291-1/+40
| | | | | | | Using one context instead of two is more efficient and we can skip another context flush. Reviewed-by: Brian Paul <[email protected]>
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | 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]>
* st/mesa: implement accelerated stencil blitting using shader stencil exportMarek Olšák2012-07-121-1/+1
| | | | Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blit: drop not-very-useful wrapper around util_blit_pixels_writemaskMarek Olšák2012-07-121-1/+2
| | | | | | just rename it to util_blit_pixels Reviewed-by: Alex Deucher <[email protected]>
* gallium/postprocess: move declarations before codeBrian Paul2012-02-021-2/+1
| | | | To fix MSVC build.
* gallium/postprocess: Just to be safe, reference all buffers from outsideLauri Kasanen2012-02-021-0/+10
| | | | | | | | | Even though it should be safe to use them for one frame, better be sure. Suggested by Michael Dänzer. NOTE: This is a candidate for the 8.0 stable branch. Signed-off-by: Lauri Kasanen <[email protected]>
* gallium/postprocess: Fix depth logicLauri Kasanen2012-02-021-1/+1
| | | | | | | | | This prevents a possible lapse of the depth buffer - the situation where the app and pp have different depth buffers. NOTE: This is a candidate for the 8.0 stable branch. Signed-off-by: Lauri Kasanen <[email protected]>
* gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2011-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Namely: - EXT_transform_feedback - ARB_transform_feedback2 - ARB_transform_feedback_instanced The old interface was not useful for OpenGL and had to be reworked. This interface was originally designed for OpenGL, but additional changes have been made in order to make st/d3d1x support easier. The most notable change is the stream-out info must be linked with a vertex or geometry shader and cannot be set independently. This is due to limitations of existing hardware (special shader instructions must be used to write into stream-out buffers), and it's also how OpenGL works (stream outputs must be specified prior to linking shaders). Other than that, each stream output buffer has a "view" into it that internally maintains the number of bytes which have been written into it. (one buffer can be bound in several different transform feedback objects in OpenGL, so we must be able to have several views around) The set_stream_output_targets function contains a parameter saying whether new data should be appended or not. Also, the view can optionally be used to provide the vertex count for draw_vbo. Note that the count is supposed to be stored in device memory and the CPU never gets to know its value. OpenGL way | Gallium way ------------------------------------ BeginTF = set_so_targets(append_bitmask = 0) PauseTF = set_so_targets(num_targets = 0) ResumeTF = set_so_targets(append_bitmask = ~0) EndTF = set_so_targets(num_targets = 0) DrawTF = use pipe_draw_info::count_from_stream_output v2: * removed the reset_stream_output_targets function * added a parameter append_bitmask to set_stream_output_targets, each bit specifies whether new data should be appended to each buffer or not. v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2, note that the draw-auto subset is always required (for d3d10), only the pause/resume functionality is limited if the CAP is not advertised v4: * update gallium/docs v5: * compactified struct pipe_stream_output_info, updated dump/trace
* gallium: move clear paths from rgba to a pointer to a color union (v2)Dave Airlie2011-09-181-1/+1
| | | | | | | | | | | | | | | 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 <[email protected]>
* pp/main queue: Add pp_run.cLauri Kasanen2011-08-191-0/+188
Signed-off-by: Lauri Kasanen <[email protected]> Signed-off-by: Brian Paul <[email protected]>