summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* swr: support samplers in vertex shadersTim Rowley2016-04-126-105/+228
| | | | Reviewed-by: George Kyriazis <george.kyriazis@intel.com>
* radeonsi: enable GLSL 4.20 and therefore OpenGL 4.2Nicolai Hähnle2016-04-123-5/+7
| | | | | | | This is the last necessary bit for OpenGL 4.2 support. All driver-specific functionality has already been implemented as part of extensions. Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* va: check null context in vlVaDestroyContextIurie Salomov2016-04-131-0/+4
| | | | | Signed-off-by: Iurie Salomov <iurcic@gmail.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com>
* nir/clone: Copy bit size when cloning registersJason Ekstrand2016-04-121-0/+1
| | | | | Reported-by: Mark Janes <mark.a.janes@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
* radeonsi: fix a critical SI hang since PIPELINESTAT_START/STOP was addedMarek Olšák2016-04-132-9/+2
| | | | | For some reason unknown to me, SI hangs if the event is written after CONTEXT_CONTROL.
* glsl: Don't copy propagate or tree graft precise values.Kenneth Graunke2016-04-123-1/+8
| | | | | | | | | | | | | | | | | | | | | | | This is kind of a hack. We currently track precise requirements by decorating ir_variables. Propagating or grafting the RHS of an assignment to a precise value into some other expression tree can lose those decorations. In the long run, it might be better to replace these ir_variable decorations with an "exact" decoration on ir_expression nodes, similar to what NIR does. In the short run, this is probably good enough. It preserves enough information for glsl_to_nir to generate "exact" decorations, and NIR will then handle optimizing these expressions reasonably. Fixes ES31-CTS.gpu_shader5.precise_qualifier. v2: Drop invariant handling, as it shouldn't be necessary (caught by Jason Ekstrand). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* i965/tiled_memcpy: Fix rgba8_copy_16_aligned_dst() typoKristian Høgsberg Kristensen2016-04-121-4/+4
| | | | | | | | | Copy and paste error in commit eafeb8db66dae7619ff3cb039706b990d718cba7: i965/tiled_memcpy: Unroll bytes==64 case. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* glsl/linker: Recurse on struct fields when adding shader variablesKristian Høgsberg Kristensen2016-04-121-6/+45
| | | | | | | | | | ARB_program_interface_query requires that we add struct fields recursively down to basic types. Fixes 52 struct test cases in dEQP-GLES31.functional.program_interface_query.* Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl/linker: Pass name and type through to create_shader_variable()Kristian Høgsberg Kristensen2016-04-121-9/+12
| | | | | | | | No functional change here, but this now lets us recurse throught structs in add_shader_variable(). Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl/linker: Pass absolute location to add_shader_variable()Kristian Høgsberg Kristensen2016-04-121-7/+10
| | | | | | | | | This lets us pass in the absolution location of a variable instead of computing it in add_shader_variable() based on variable location and bias. This is in preparation for recursing into struct variables. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl/linker: Add add_shader_variable() helperKristian Høgsberg Kristensen2016-04-121-19/+23
| | | | | | | | | | This consolidates the combination of create_shader_variable() and add_program_resource() into a new helper function. No functional difference, but we'll expand add_shader_variable() in the next few commits. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/tiled_memcpy: Unroll bytes==64 case.Matt Turner2016-04-121-0/+16
| | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* i965/tiled_memcpy: Provide SSE2 for RGBA8 <-> BGRA8 swizzle.Roland Scheidegger2016-04-121-3/+40
| | | | | | | | | | | | | | | The existing code uses SSSE3, and because it isn't compiled in a separate file compiled with that, it is usually not used (that, of course, could be fixed...), whereas SSE2 is always present with 64-bit builds. This should be pretty much as fast as the pshufb version, albeit those code paths aren't really used on chips without llc in any case. v2: fix andnot argument order, add comments v3: use pshuflw/hw instead of shifts (suggested by Matt Turner), cut comments v4: [mattst88] Rebase Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965/tiled_memcpy: Move SSSE3 code back into inline functions.Matt Turner2016-04-121-18/+24
| | | | | | This will make adding SSE2 code a lot cleaner. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* i965/tiled_memcpy: Optimize RGBA -> BGRA swizzle.Matt Turner2016-04-121-8/+11
| | | | | | | Replaces four byte loads and four byte stores with a load, bswap, rotate, store; or a movbe, rotate, store. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* radeonsi: fix bounds check in si_create_vertex_elementsNicolai Hähnle2016-04-121-1/+1
| | | | | | | | | This was triggered by dEQP-GLES3.functional.vertex_array_objects.all_attributes Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* docs: mark atomic counters and SSBOs as done for radeonsiNicolai Hähnle2016-04-122-7/+7
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: enable shader buffer pipe capsNicolai Hähnle2016-04-121-2/+2
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: add shader buffer support to TGSI_OPCODE_RESQNicolai Hähnle2016-04-121-6/+11
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: add shader buffer support to TGSI_OPCODE_STORENicolai Hähnle2016-04-121-18/+111
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: add shader buffer support to TGSI_OPCODE_LOADNicolai Hähnle2016-04-121-19/+70
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: add shader buffer support to TGSI_OPCODE_ATOM*Nicolai Hähnle2016-04-121-15/+46
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: add offset parameter to buffer_append_argsNicolai Hähnle2016-04-121-5/+10
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: adjust buffer_append_args to take a 128 bit resourceNicolai Hähnle2016-04-121-7/+23
| | | | | | | Move the buffer resource extraction code out into its own function. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: preload shader buffers in shadersNicolai Hähnle2016-04-121-0/+17
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: implement set_shader_buffersNicolai Hähnle2016-04-125-58/+125
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* radeonsi: move resetting of constant buffers into a separate functionNicolai Hähnle2016-04-121-15/+26
| | | | | | | This will be re-used for shader buffers. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* dri/i965: fix incorrect rgbFormat in intelCreateBuffer().Haixia Shi2016-04-121-8/+12
| | | | | | | | | | | | | | | It is incorrect to assume that pixel format is always in BGR byte order. We need to check bitmask parameters (such as |redMask|) to determine whether the RGB or BGR byte order is requested. v2: reformat code to stay within 80 character per line limit. v3: just fix the byte order problem first and investigate SRGB later. v4: rebased on top of the GLES3 sRGB workaround fix. v5: rebased on top of the GLES3 sRGB workaround fix v2. Signed-off-by: Haixia Shi <hshi@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Reject illegal qualifiers on atomic counter uniforms.Kenneth Graunke2016-04-121-0/+11
| | | | | | | | | | | | | | | | | | | This fixes dEQP-GLES31.functional.uniform_location.negative.atomic_fragment dEQP-GLES31.functional.uniform_location.negative.atomic_vertex Both of which have lines like layout(location = 3, binding = 0, offset = 0) uniform atomic_uint uni0; The ARB_explicit_uniform_location spec makes a very tangential mention regarding atomic counters, but location isn't something that makes sense with them. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
* glsl: Add a method to print error messages for illegal qualifiers.Kenneth Graunke2016-04-122-0/+90
| | | | | | | | | Suggested by Timothy Arceri a while back on mesa-dev: https://lists.freedesktop.org/archives/mesa-dev/2016-February/107735.html Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com>
* xlib: fix memory leak on Display closeJohn Sheu2016-04-122-1/+2
| | | | | | | | | The XMesaVisual instances freed in the visuals table on display close are being freed with a free() call, instead of XMesaDestroyVisual(), causing a memory leak. Signed-off-by: John Sheu <sheu@google.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/mesa: Replace GLvoid with voidJakob Sinclair2016-04-125-26/+26
| | | | | | | | | | GLvoid was used before in OpenGL but it has changed to just using void. All GLvoids in mesa's state tracker has been changed to void in this patch. Tested this with piglit and no problems were found. No compiler warnings. Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* radeonsi: Mark ARB_robust_buffer_access_behavior as supported.Bas Nieuwenhuizen2016-04-123-2/+3
| | | | | Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium: Add capability for ARB_robust_buffer_access_behavior.Bas Nieuwenhuizen2016-04-1218-0/+22
| | | | | | Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa: Expose the ARB_robust_buffer_access_behavior extension.Bas Nieuwenhuizen2016-04-123-1/+3
| | | | | Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* main: rework the compatibility check of visuals in glXMakeCurrentMiklós Máté2016-04-121-30/+12
| | | | | | | | | Now it follows the compatibility criteria listed in section 2.1 of the GLX 1.4 specification. This is needed for post-process effects in SW:KotOR. Signed-off-by: Miklós Máté <mtmkls@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* swr: [rasterizer core] warning cleanupTim Rowley2016-04-122-5/+4
| | | | Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer] Put in rudimentary garbage collection for the global arena ↵Tim Rowley2016-04-123-61/+187
| | | | | | | | | | | allocator - Check for unused blocks every few frames or every 64K draws - Delete data unused since the last check if total unused data is > 20MB Doesn't seem to cause a perf degridation Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer core] Put DRAW_CONTEXT on a dietTim Rowley2016-04-127-49/+43
| | | | | | No need for 256 pointers per DC. Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer core] Add experimental support for hyper-threaded front-endTim Rowley2016-04-125-56/+139
| | | | Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer] Avoid segv in thread creation on machines with ↵Tim Rowley2016-04-121-0/+4
| | | | | | non-consecutive NUMA topology. Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer core] Replace all naked OSALIGN macro uses with OSALIGNSIMD ↵Tim Rowley2016-04-124-14/+14
| | | | | | | | / OSALIGNLINE Future proofing Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer] Ensure correct alignment of stack variables used as vectorsTim Rowley2016-04-122-3/+4
| | | | Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer core] Quantize depth to depth buffer precision prior to ↵Tim Rowley2016-04-125-13/+81
| | | | | | | | depth test/write. Fixes z-fighting issues. Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer common] win32 build fixupsTim Rowley2016-04-121-6/+0
| | | | Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer core] Affinitize thread scratch space to numa node of workerTim Rowley2016-04-123-4/+16
| | | | Acked-by: Brian Paul <brianp@vmware.com>
* swr: [rasterizer] Misc fixes identified by static code analysisTim Rowley2016-04-124-6/+21
| | | | | | No perf loss detected Acked-by: Brian Paul <brianp@vmware.com>
* st/mesa: fix memleak in glDrawPixels cache codeBrian Paul2016-04-121-5/+18
| | | | | | | | | | | | | | If the glDrawPixels size changed, we leaked the previously cached texture, if there was one. This patch fixes the reference counting, adds a refcount assertion check, and better handles potential malloc() failures. Tested with a modified version of the drawpix Mesa demo which changed the image size for each glDrawPixels call. Cc: "11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* gallium: Use STATIC_ASSERT whenever possible.Jose Fonseca2016-04-123-3/+3
| | | | | Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* softpipe: Use STATIC_ASSERT whenever possible.Jose Fonseca2016-04-121-2/+2
| | | | | Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>