summaryrefslogtreecommitdiffstats
path: root/src/gallium/docs/source/context.rst
Commit message (Collapse)AuthorAgeFilesLines
* gallium-docs: Add documentation for when using several contextsAxel Davy2016-12-201-0/+23
| | | | | | | | Add documentation to explicit what can be expected and what is allowed when using several contexts. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add pipe_context::set_device_reset_callbackNicolai Hähnle2016-10-051-0/+15
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/docs: clarify render_condition_enabled parameter to clear functionsBrian Paul2016-08-311-0/+4
| | | | | | If false, it means do the clear unconditionally. Reviewed-by: Marek Olšák <[email protected]>
* gallium: add a pipe_context parameter to fence_finishMarek Olšák2016-08-101-6/+4
| | | | | | | | required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add render_condition_enable param to clear_render_target/depth_stencilMarek Olšák2016-08-101-3/+4
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: split transfer_inline_write into buffer and texture callbacksMarek Olšák2016-07-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | to reduce the call indirections with u_resource_vtbl. The worst call tree you could get was: - u_transfer_inline_write_vtbl - u_default_transfer_inline_write - u_transfer_map_vtbl - driver_transfer_map - u_transfer_unmap_vtbl - driver_transfer_unmap That's 6 indirect calls. Some drivers only had 5. The goal is to have 1 indirect call for drivers that care. The resource type can be determined statically at most call sites. The new interface is: pipe_context::buffer_subdata(ctx, resource, usage, offset, size, data) pipe_context::texture_subdata(ctx, resource, level, usage, box, data, stride, layer_stride) v2: fix whitespace, correct ilo's behavior Reviewed-by: Nicolai Hähnle <[email protected]> Acked-by: Roland Scheidegger <[email protected]>
* gallium: add PIPE_FLUSH_DEFERREDMarek Olšák2016-07-221-0/+10
| | | | | | | | | | | | | There are 2 uses: - Asynchronous flushing for multithreaded drivers. - Return a fence without flushing (mid-command-buffer fence). The driver can defer flushing until fence_finish is called. This is required to make Bioshock Infinite faster, which creates 1000 fences (flushes) per frame. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* Remove wrongly repeated words in commentsGiuseppe Bilotta2016-06-231-1/+1
| | | | | | | | | | | | | | | | | Clean up misrepetitions ('if if', 'the the' etc) found throughout the comments. This has been done manually, after grepping case-insensitively for duplicate if, is, the, then, do, for, an, plus a few other typos corrected in fly-by v2: * proper commit message and non-joke title; * replace two 'as is' followed by 'is' to 'as-is'. v3: * 'a integer' => 'an integer' and similar (originally spotted by Jason Ekstrand, I fixed a few other similar ones while at it) Signed-off-by: Giuseppe Bilotta <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* gallium: add API for setting window rectanglesIlia Mirkin2016-06-181-3/+14
| | | | | | | | | | | | | | | | | | Window rectangles apply to all framebuffer operations, either in inclusive or exclusive mode. They may also be specified as part of a blit operation. In exclusive mode, any fragment inside any of the specified rectangles will be discarded. In inclusive mode, any fragment outside every rectangle will be discarded. The no-op state is to have 0 rectangles in exclusive mode. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add pipe_context::set_active_query_state for pausing queriesMarek Olšák2016-04-121-0/+3
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add a way to store query result into bufferIlia Mirkin2016-02-041-0/+5
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/st: add pipe_context::generate_mipmap()Charmaine Lee2016-01-141-0/+11
| | | | | | | | | | | | | | | | This patch adds a new interface to support hardware mipmap generation. PIPE_CAP_GENERATE_MIPMAP is added to allow a driver to specify if this new interface is supported; if not supported, the state tracker will fallback to mipmap generation by rendering/texturing. v2: add PIPE_CAP_GENERATE_MIPMAP to the disabled section for all drivers v3: add format to the generate_mipmap interface to allow mipmap generation using a format other than the resource format v4: fix return type of trace_context_generate_mipmap() Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: add PIPE_CAP_CLEAR_TEXTURE and clear_texture prototypeIlia Mirkin2015-11-111-0/+4
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: expose a debug message callback settable by context ownerIlia Mirkin2015-11-051-0/+3
| | | | | | | This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add interface for writable shader imagesMarek Olšák2015-07-161-8/+8
| | | | | | PIPE_CAPs will be added some other time. Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add set_tess_state to configure default tessellation parametersIlia Mirkin2015-05-161-0/+5
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add an index argument to create_queryIlia Mirkin2014-07-011-0/+4
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/docs: improve documentation of render condition wrt blits.Roland Scheidegger2014-05-311-3/+7
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium/docs: clarify when query results are resetRob Clark2014-05-141-0/+2
| | | | | | | | It wasn't completely clear from the docs, so I had to figure out by looking at piglit results. Hopefully this saves the next driver writer implementing queries some time. Signed-off-by: Rob Clark <[email protected]>
* gallium: add basic support for ARB_sample_shadingIlia Mirkin2014-04-261-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/docs: fix incorrect/missing referencesIlia Mirkin2014-04-011-3/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add interface to clear buffersIlia Mirkin2014-03-311-0/+5
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: allow setting of the internal stream output offsetZack Rusin2014-03-071-4/+5
| | | | | | | | | | | | | | | | 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: add interface for persistent and coherent buffer mappingsMarek Olšák2014-02-251-0/+22
| | | | Required for ARB_buffer_storage.
* gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul2013-10-231-10/+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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
* gallium/docs: update bind_sampler_states() documentationBrian Paul2013-10-031-5/+6
|
* gallium: add flush_resource context functionMarek Olšák2013-09-201-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 <[email protected]>
* draw: clean up setting stream out information a bitRoland Scheidegger2013-08-271-0/+2
| | | | | | | | | | | | | | | | | In particular noone is interested in the vertex count, so drop that, and also drop the duplicated num_primitives_generated / so.primitives_storage_needed variables in drivers. I am unable for now to figure out if primitives_storage_needed in SO stats (used for d3d10) should increase if SO is disabled, though the equivalent num_primitives_generated used for OpenGL definitely should increase. In any case we were only counting when SO is active both in softpipe and llvmpipe anyway so don't pretend there's an independent num_primitives_generated counter which would count always. (This means the PIPE_QUERY_PRIMITIVES_GENERATED count will still be wrong just as before, should eventually fix this by doing either separate counting for this query or adjust the code so it always counts this even if SO is inactive depending on what's correct for d3d10.) Reviewed-by: Brian Paul <[email protected]>
* gallium: fix PIPE_QUERY_TIMESTAMP_DISJOINTRoland Scheidegger2013-06-191-4/+6
| | | | | | | | | | | The semantics didn't really make sense, not really matching neither d3d9 (though the docs are all broken there) nor d3d10. So make it match d3d10 semantics, which actually gives meaning to the "disjoint" part. Drivers are fixed up in a very primitive way, I have no idea what could actually cause the counter to become unreliable so just always return FALSE for the disjoint part. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: add condition parameter to render_conditionRoland Scheidegger2013-06-181-5/+9
| | | | | | | | | | | | | 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]>
* gallium/docs: fix up transfer description for 1d arrays, add cube map arraysRoland Scheidegger2013-06-071-5/+4
| | | | | | | | | | | Transfers always use z/depth for layers no matter if it's a 1d or 2d array texture, we don't follow OpenGL's crazyness there. Luckily this appears to only be a doc bug, everyone doing the right thing already. While here also document z/depth parameter for cube map arrays. v2: fix typo spotted by Eric Anholt Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Add support for multiple viewportsZack Rusin2013-05-251-3/+5
| | | | | | | | | | | | 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]>
* gallium/docs: fix definition of PIPE_QUERY_SO_STATISTICSChristoph Bumiller2013-04-031-3/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* d3d1x: Remove.José Fonseca2013-03-121-1/+1
| | | | | | Unused/unmaintained. Reviewed-by: Christoph Bumiller <[email protected]>
* gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATEMarek Olšák2013-01-151-2/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/docs: fix sphinx warningAndreas Boll2012-10-241-1/+1
| | | | | | | src/gallium/docs/source/context.rst:495: WARNING: malformed hyperlink target. Reviewed-by: Brian Paul <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-111-13/+11
| | | | | | | | | | | | | | "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]>
* gallium: remove resource_resolveMarek Olšák2012-09-301-14/+0
| | | | | | | The functionality is provided by the new blit function. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add blit into the interfaceMarek Olšák2012-09-301-0/+9
| | | | | Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/docs: remove documentation of redefine_user_bufferMarek Olšák2012-05-121-14/+0
|
* gallium/tgsi: Add resource write-back support.Francisco Jerez2012-05-111-1/+2
| | | | | Define a new STORE opcode with a role dual to the LOAD opcode, and add flags to specify that a shader resource is intended for writing.
* gallium: Add context hooks for binding shader resources.Francisco Jerez2012-05-111-1/+19
|
* gallium: Basic compute interface.Francisco Jerez2012-05-111-0/+39
| | | | | | | | | | Define an interface that exposes the minimal functionality required to implement some of the popular compute APIs. This commit adds entry points to set the grid layout and other state required to keep track of the usual address spaces employed in compute APIs, to bind a compute program, and execute it on the device. Reviewed-by: Marek Olšák <[email protected]>
* gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2011-12-151-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add new query types and missing documentationChristoph Bumiller2011-10-201-6/+57
|
* gallium: extend resource_resolve to accommodate BlitFramebufferChristoph Bumiller2011-08-041-1/+8
| | | | | | | | | | | | | Resolve via glBlitFramebuffer allows resolving a sub-region of a renderbuffer to a different location in any mipmap level of some other texture, and, with a new extension, even scaling. Therefore, location and size parameters are needed. The mask parameter was added because resolving only depth or only stencil of a combined buffer is possible as well. Full information about the blit operation allows the drivers to take the most efficient path they possibly can.
* gallium/docs: Improve min_index/max_index description.José Fonseca2011-04-161-8/+17
|
* gallium: add texture barrier support to the interface and st/mesa (v2)Marek Olšák2011-03-151-0/+10
| | | | v2: change the gallium entry point to texture_barrier.
* gallium/docs: Update PIPE_TRANSFER_xx docs. Reformat to use definitions.José Fonseca2011-02-221-13/+29
|
* gallium: notify drivers about possible changes in user buffer contentsMarek Olšák2011-02-141-0/+16
| | | | Also implement the redefine_user_buffer hook in the drivers.