summaryrefslogtreecommitdiff
path: root/src/gallium/include
AgeCommit message (Collapse)AuthorFilesLines
2017-07-14st/mesa: Add support for KHR_no_error flagGrigori Goronzy1-0/+1
Add a new context flag and plumb it through the various layers of the context creation code to set up dispatch tables for the no-error mode. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-11st/mesa: add a winsys buffers list in st_contextCharmaine Lee1-0/+5
Commit a5e733c6b52e93de3000647d075f5ca2f55fcb71 fixes the dangling framebuffer object by unreferencing the window system draw/read buffers when context is released. However this can prematurely destroy the resources associated with these window system buffers. The problem is reproducible with Turbine Demo running with VMware driver. In this case, the depth buffer content was lost when the context is rebound to a drawable. To prevent premature destroy of the resources associated with window system buffers, this patch maintains a list of these buffers in the context, making sure the reference counts of these buffers will not reach zero until the associated framebuffer interface objects no longer exist. This also helps to avoid unnecessary destruction and re-construction of the resources associated with the framebuffer. Fixes VMware bug 1909807. Reviewed-by: Brian Paul <brianp@vmware.com>
2017-06-26mesa/glthread: add glthread "perf" counters and pass them to gallium HUDMarek Olšák1-1/+3
for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-23st/dri: add a drirc workaround for Rocket LeagueMarek Olšák1-0/+6
This needs to be passed to gallium drivers. No game fix is planned at this time. The addition of glsl_correct_derivatives_after_discard is generally a good thing for mesa compatibility with the broader GL driver ecosystem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100070 Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-23gallium: allow passing 'unsigned flags' to create_screen()Marek Olšák1-1/+1
for drirc options Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-14gallium: add ARB_bindless_texture interfaceSamuel Pitoiset1-0/+59
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-14gallium: add PIPE_CAP_BINDLESS_TEXTURESamuel Pitoiset1-0/+1
Whether bindless texture operations are supported by the underlying driver. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-09gallium: introduce format modifier queryingVarad Gautam1-0/+14
format modifiers tokens are driver specific, and hence, need to come in from the driver. this allows drivers to be queried for supported format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: drivers must return false on query failure. v4: use pscreen->is_format_supported instead of adding a separate format query handle, remove PIPE_CAP_QUERY_DMABUF_ATTRIBS. (Lucas Stach) v5: add external_only parameter. Signed-off-by: Varad Gautam <varad.gautam@collabora.com> Cc: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
2017-06-09st/dri: implement createImageWithModifiers in DRIimageVarad Gautam1-0/+15
adds a pscreen->resource_create_with_modifiers() to create textures with modifier. v2: - stylefixes (Emil Velikov) - don't return selected modifier from resource_create_with_modifiers. we can use the winsys_handle to get this. Signed-off-by: Varad Gautam <varad.gautam@collabora.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> (v1) Cc: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
2017-06-09gallium/winsys/drm: introduce modifier field to winsys_handleVarad Gautam1-0/+6
we use this to import resources with format modifiers, and to support per-resource modifier queries. Signed-off-by: Varad Gautam <varad.gautam@collabora.com> Cc: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
2017-06-02gallium: Add a cap to check if the driver supports ARB_post_depth_coverageLyude1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-06-02gallium: Add TGSI shader token for ARB_post_depth_coverageLyude1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-05-24Revert "gallium: remove unused PIPE_CC_GCC_VERSION"Brian Paul1-0/+1
This reverts commit e60928f4c4bd4484821d83f2b16a910ea9f5f9d9. PIPE_CC_GCC_VERSION is used by some of our in-house code which hasn't been upstreamed yet.
2017-05-20driconf: Add allow_glsl_builtin_variable_redeclaration optionJohn Brooks1-0/+1
This option will allow GLSL builtins to be redeclared verbatim (e.g. redeclaring "in int gl_VertexID" in a vertex shader). This is not strictly valid and would normally fail to compile, but some applications (such as newer Techland ports) do it and need more leniency. v2 (Samuel Pitoiset): - Rename allow_glsl_builtin_redeclaration -> allow_glsl_builtin_variable_redeclaration Signed-off-by: John Brooks <john@fastquake.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-05-18tgsi: store the sampler view type directly in the instructionSamuel Pitoiset1-1/+3
RadeonSI needs to do a special lowering for Gather4 with integer formats, but with bindless samplers we just can't access the index. Instead, store the return type in the instruction like the target. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17gallium: add PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTIONMarek Olšák1-0/+1
for skipping mapped-buffer checking in every GL draw call Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-15gallium: add flag PIPE_CONTEXT_PREFER_THREADEDMarek Olšák1-0/+8
State trackers can set this to tell the driver when u_threaded_context is desirable. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-05-10gallium: add PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEXMarek Olšák1-0/+1
The next patch will use it. This is really for svga and GL2-level drivers. Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-05-10gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák2-21/+21
pipe_draw_info::indexed is replaced with index_size. index_size == 0 means non-indexed. Instead of pipe_index_buffer::offset, pipe_draw_info::start is used. For indexed indirect draws, pipe_draw_info::start is added to the indirect start. This is the only case when "start" affects indirect draws. pipe_draw_info::index is a union. Use either index::resource or index::user depending on the value of pipe_draw_info::has_user_indices. v2: fixes for nine, svga
2017-05-10gallium: separate indirect stuff from pipe_draw_info - 80 -> 56 bytesMarek Olšák1-32/+35
For faster initialization of non-indirect draws.
2017-05-10gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák1-4/+7
2017-05-09util: move ALWAYS_INLINE macro to util/macro.hTimothy Arceri1-11/+0
Also added clang check. macro.h is include by p_compiler.h so no other change is needed. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-04-26gallium: add PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERSSamuel Pitoiset1-0/+1
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-14gallium: add PIPE_CAP_TGSI_TES_LAYER_VIEWPORTNicolai Hähnle1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-04-05tgsi: add SUBGROUP_* semanticsIlia Mirkin1-0/+7
v2: add documentation (Nicolai) Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-05tgsi: add BALLOT/READ_* opcodesIlia Mirkin1-3/+3
v2 (Nicolai): - BALLOT isn't per-channel - expand the documentation (also for VOTE_*) v3: - only BALLOT returns a 64-bit lanemask (Boyan) - relax the requirement on READ_INVOC: the invocation number to read from must be uniform within a sub-group. This matches the GL_ARB_shader_ballot spect (and the v_readlane instruction of AMD GCN) v4: - hopefully really fix the doc of VOTE_* returns (Ilia) Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
2017-04-05gallium: add PIPE_CAP_TGSI_BALLOTNicolai Hähnle1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-05gallium: add sparse buffer interface and capabilityNicolai Hähnle2-0/+15
v2: - explain the resource_commit interface in more detail Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-04gallium: decrease the size of pipe_draw_info - 88 -> 80 bytesMarek Olšák1-1/+1
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_vertex_element - 16 -> 8 bytesMarek Olšák1-8/+8
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_resource - 64 -> 48 bytesMarek Olšák1-6/+6
Some other changes needed here. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_box - 24 -> 16 bytesMarek Olšák1-4/+7
Also: pipe_transfer: 48 -> 40 bytes. pipe_blit_info = 176 -> 160 bytes. v2: add a comment at pipe_box Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_sampler_view - 48 -> 32 bytesMarek Olšák1-6/+6
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_surface - 48 -> 40 bytesMarek Olšák1-5/+4
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_framebuffer_state - 96 -> 80 bytesMarek Olšák1-4/+4
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_stream_output_info - 532 -> 268 bytesMarek Olšák1-2/+2
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-04-04gallium: decrease the size of pipe_rasterizer_state - 36 -> 32 bytesMarek Olšák1-1/+7
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-03-31gallium: Add NV_fill_rectangle to pipe stateLyude1-0/+1
Signed-off-by: Lyude <lyude@redhat.com> Changes since v1: - Fix accidental widening of bitfields Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-03-31gallium: Add a cap to check if the driver supports fill_rectangleLyude1-0/+1
Changes since v1: - Add pipe caps for etnaviv, freedreno, swr and virgl Signed-off-by: Lyude <lyude@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-04-01gallium: remove support for predicates from TGSI (v2)Marek Olšák2-21/+1
Neved used. v2: gallivm: rename "pred" -> "exec_mask" etnaviv: remove the cap gallium: fix tgsi_instruction::Padding Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-03-31tgsi: add CLOCK opcodeIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-31gallium: add PIPE_CAP_TGSI CLOCKNicolai Hähnle1-0/+1
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-22driconf: add force_glsl_abs_sqrt optionSamuel Pitoiset1-0/+1
This will allow to force computing the absolute value for sqrt() and inversesqrt() in order to follow D3D9 behaviour for buggy apps that rely on it. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-16gallium: implement the backend of threaded GL dispatchMarek Olšák1-0/+19
Acked-by: Timothy Arceri <tarceri@itsqueeze.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Tested-by: Mike Lothian <mike@fireburn.co.uk>
2017-03-15gallium: add TGSI opcodes TEX_LZ and TXF_LZMarek Olšák1-2/+2
for better code generation in radeonsi
2017-03-15gallium: add PIPE_CAP_TGSI_TEX_TXF_LZMarek Olšák1-0/+1
2017-03-13gallium: add P016 formatChristian König1-0/+2
Same layout as NV12, but 16bit per channel instead of 8. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Mark Thompson <sw@jkqxz.net>
2017-03-08gallium: s/uint/enum pipe_render_cond_flag/ for set_render_condition()Brian Paul1-1/+1
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-03-08gallium: s/uint/enum pipe_shader_type/ for set_constant_buffer()Brian Paul1-1/+1
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-03-08gallium: s/unsigned/enum pipe_shader_type/ for get_compiler_options()Brian Paul1-1/+1
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>