summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: improve assertions in vp/fp translationMarek Olšák2015-06-161-2/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* glsl: Add ir node for barrierChris Forbes2015-06-121-0/+7
| | | | | | | | | v2: * Changes suggested by mattst88 [[email protected]: Add nir support] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* mesa: use GL_GEOMETRY_PROGRAM_NV instead of MESA_GEOMETRY_PROGRAMMarek Olšák2015-06-053-6/+6
| | | | | | | | There's no reason to use our own definition. Tessellation will use the NV definitions too. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: use TGSI array declarations for VS,GS arrays of outputs (v2)Marek Olšák2015-06-054-41/+103
| | | | v2: don't use PIPE_MAX_SHADER_ARRAYS
* glsl_to_tgsi: use TGSI array declarations for GS,FS arrays of inputs (v2)Marek Olšák2015-06-053-23/+201
| | | | v2: don't use PIPE_MAX_SHADER_ARRAYS
* glsl_to_tgsi: remove some emit functions by using C++ default valuesMarek Olšák2015-06-051-61/+12
|
* glsl_to_tgsi: rename emit -> emit_asmMarek Olšák2015-06-051-214/+214
| | | | My editor thinks "emit" is a keyword, which breaks code indexing.
* glsl_to_tgsi: remove memset after callocMarek Olšák2015-06-051-2/+0
|
* glsl_to_tgsi: don't use a static array size for st_translate::arraysMarek Olšák2015-06-051-8/+9
|
* glsl_to_tgsi: don't use a static array size for "array_sizes"Marek Olšák2015-06-051-5/+13
|
* tgsi/ureg: don't emit in/out arrays if drivers don't support ranged declarationsMarek Olšák2015-06-051-3/+3
| | | | | | Softpipe, llvmpipe, r300g, and radeonsi pass tests. Other drivers need testing. Freedreno and nv30 are definitely broken. Other drivers seem to be alright.
* tgsi/ureg: add support for GS input array declarationsMarek Olšák2015-06-052-2/+2
|
* tgsi/ureg: rename and simplify ureg_DECL_gs_inputMarek Olšák2015-06-052-8/+6
| | | | | There is nothing special about it and it's used for tessellation shaders too.
* tgsi/ureg: add support for FS input array declarationsMarek Olšák2015-06-051-1/+1
|
* mesa: reference built-in uniforms into gl_uniform_storageMartin Peres2015-06-041-1/+1
| | | | | | | | | | | | | | | This change introduces a new field in gl_uniform_storage to explicitely say that a uniform is built-in. In the case where it is, no storage is defined to make it clear that it is read-only from the mesa side. I fixed all the places in the code that made use of the structure that I changed. Any place making a wrong assumption and using the storage straight away will just crash. This patch seems to implement the path of least resistance towards listing built-in uniforms in GL_ACTIVE_UNIFORM (and other APIs). Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* program: Shrink and rename SaturateMode field to Saturate.Matt Turner2015-06-031-1/+1
| | | | | | | | | | | It was 2 bits to accommodate SATURATE_PLUS_MINUS_ONE (removed by commit 09b566e1). A similar change was made to TGSI recently in commit e1c4e8aa. Reducing the size from 2 bits to 1 reduces the size of the bit fields from 17 bits to 16, which is a much nicer number. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: silence unused var warnings for non-debug buildBrian Paul2015-06-011-0/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* Revert "st/mesa: Enable ARB_direct_state_access"Ian Romanick2015-05-281-6/+0
| | | | | | | This reverts commit 357bf80caade9e0be20dcc88ec38884e34abc986. Acked-by: Fredrik Höglund <[email protected]> Cc: "10.6" <[email protected]>
* mesa: Allow overriding the version of ES2+ contextsIan Romanick2015-05-281-2/+1
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* st/mesa: don't leak glsl_to_tgsi object on link failureIlia Mirkin2015-05-251-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.5 10.6" <[email protected]>
* cso: add context cleanup code from st/mesaMarek Olšák2015-05-201-6/+0
| | | | | | | | | | This fixes a crash in nouveau which can't handle set_constant_buffer(PIPE_SHADER_TESS_*). Cc: 10.6 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: disable tessellation shaders for meta opsMarek Olšák2015-05-164-2/+26
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/mesa: Flush the bitmap cache in st_BlitFramebufferFredrik Höglund2015-05-151-0/+4
| | | | | | | | | | With DSA we can no longer rely on this being done in st_validate_state in response to the framebuffer bindings having changed. This fixes the ext_framebuffer_multisample-bitmap piglit test. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: Enable ARB_direct_state_accessFredrik Höglund2015-05-141-0/+6
| | | | | | | | | | Assume that all drivers that advertise support for NPOT textures are able to support GL 2.0. v2: Add a comment. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* main: Rename framebuffer renderbuffer software fallback.Laura Ekstrand2015-05-141-1/+1
| | | | | | | | | Rename _mesa_framebuffer_renderbuffer to _mesa_FramebufferRenderbuffer_sw in preparation for adding the ARB_direct_state_access backend function for FramebufferRenderbuffer and NamedFramebufferRenderbuffer to share. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* st/mesa: update stencil surface if it comes from textureIlia Mirkin2015-05-121-1/+4
| | | | | | | Now that ARB_texture_stencil8 is supported, this might happen. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: translate st_api robustness flags to gl_context flagsMarek Olšák2015-05-121-0/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: implement GetGraphicsResetStatusMarek Olšák2015-05-124-6/+42
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: make sure to create a "clean" bool when doing i2bIlia Mirkin2015-05-111-1/+1
| | | | | | | | | | | | i2b has to work for all integers, not just 1. INEG would not necessarily result with all bits set, which is something that other operations can rely on by e.g. using AND (or INEG for b2i). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Cc: [email protected]
* util: Move gallium's linked list to utilJason Ekstrand2015-05-081-1/+1
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* st/mesa: add double input support including lowering (v3.1)Dave Airlie2015-05-085-45/+164
| | | | | | | | | | | | | | | | | This takes a different approach to previously, we cannot index into the inputMapping with anything but the mesa attribute index, so we can't use the just add one to index trick, we need more info to add one to it after we've mapped the input. (Fixed copy propgation and cleaned up a little) v2: drop float64 format check, just attr->Doubles. merge enable patch. v3: cleanup code a bit. v3.1: minor review fixups (comment, newline) (Ilia) Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/glsl_to_tgsi: fix ir_assignment hack doing bad things for doublesDave Airlie2015-05-081-0/+1
| | | | | | | | | | | This hack for fixing gl_FragDepth apparantly caused a GLSL shader outputting a single double to try and output a dvec4, but we hadn't assigned outputs for the secondary bit. This avoids going into the hack code for scalar doubles. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: fix pipe_query_result result initializerBrian Paul2015-05-051-1/+1
| | | | | | Fixes MSVC build error. Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: fix st_NewPerfMonitor() declarationBrian Paul2015-05-051-1/+1
| | | | | | Was missing the context parameter. Fixes MSVC warning. Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: also try PIPE_FORMAT_R10G10B10A2_UNORM for GL_RGB10Brian Paul2015-05-051-1/+1
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: implement GL_AMD_performance_monitorChristoph Bumiller2015-05-063-0/+498
| | | | | | | | | | | | | | | | | | | | This is based on the original patch of Christoph Bumiller. v2 (Samuel Pitoiset): - improve Gallium interface for this extension - rewrite some parts of the original code - fix compilation errors and piglit tests v3: - only enable this extension when the underlying driver expose GPU counters - get rid of the ring buffer of queries v4: - add a debug message when the maximum number of counters has been reached Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* st/mesa: allow glsl version up to 410, enable ARB_shader_precisionIlia Mirkin2015-04-281-2/+4
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Fix a few typosZoë Blade2015-04-271-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* st/mesa: add ARB_texture_stencil8 support (v4)Dave Airlie2015-04-234-16/+22
| | | | | | | | | | | | | | | | | | if we support stencil texturing, enable texture_stencil8 there is no requirement to support native S8 for this, the texture can be converted to x24s8 fine. v2: fold fixes from Marek in: a) put S8 last in the list b) fix renderable to always test for d/s renderable fixup the texture case to use a stencil only format for picking the format for the texture view. v3: hit fallback for getteximage v4: put s8 back in front, it shouldn't get picked now (Ilia) Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/st: Free st_translate with FREE macro.Brian Paul2015-04-171-1/+1
| | | | | | | | | To match CALLOC_STRUCT macro. Fixes memory corruption on Windows when u_memory's memory debugging is enabled. Reviewed-by: Jose Fonseca <[email protected]>
* glsl_to_tgsi: only associate the uniform storage once at link timeMarek Olšák2015-04-161-24/+0
| | | | | | This hack is no longer needed. (see the previous commit) Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: add STATE_FB_WPOS_Y_TRANSFORM at link timeMarek Olšák2015-04-161-20/+24
| | | | | | | This will allow removing the uniform storage re-association during TGSI generation at draw time. Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: add assertions for detecting out-of-bounds immediates accessMarek Olšák2015-04-161-0/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: don't use a potentially-undefined immediate for ir_query_levelsMarek Olšák2015-04-161-5/+3
| | | | | Cc: 10.4 10.5 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: fix out-of-bounds constant access and crash for uniformsMarek Olšák2015-04-161-4/+7
| | | | | | | | | This fixes piglit shaders@glsl-fs-uniform-array-loop-unroll with immediate shader compilation - it's a compiler test, so it has never been translated to TGSI before. Cc: 10.4 10.5 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: cleanup includesMarek Olšák2015-04-163-25/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add a debug option to compile shaders at link timeMarek Olšák2015-04-166-4/+55
| | | | | | | v2: fix crashes Tested-by: Tom Stellard <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: log shaders, GLSL info log with _mesa_log()Brian Paul2015-04-151-6/+4
| | | | | | As with previous patch. Reviewed-by: José Fonseca <[email protected]>
* state_tracker: replace __FUNCTION__ with __func__Marius Predut2015-04-148-18/+18
| | | | | | | | | | | Consistently just use C99's __func__ everywhere. The patch was verified with Microsoft Visual studio 2013 redistributable package(RTM version number: 18.0.21005.1) Next MSVC versions intends to support __func__. No functional changes. Acked-by: Matt Turner <[email protected]> Signed-off-by: Marius Predut <[email protected]>
* st/mesa: align cube map arrays layersDave Airlie2015-04-141-1/+1
| | | | | | | | | | | | | | | | | We create textures internally for texsubimage, and we use the values from sub image to create a new texture, however we don't align these to valid sizes, and cube map arrays must have an array size aligned to 6. This fixes texsubimage cube_map_array on CAYMAN at least, (it was causing GPU hang and bad values), it probably also fixes it on radeonsi and evergreen. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89957 Tested-by: Tom Stellard <[email protected]> Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>