summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* scons: Move fallback HAVE_* definitions to headers.Jose Fonseca2016-04-261-0/+2
| | | | | | | | | | | | | | | | | | These were being defined in SCons, but it's not practical: - we actually need to include Gallium headers from external source trees, with completely disjoint build infrastructure, and it's unsustainable to replicate the HAVE_xxx checks or even hard-coded defines across everywhere. - checking compiler version via command line doesn't really work due to Clang essentially being like a cameleon which can fake either GCC or MSVC There's no change for autoconf. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nir: Add missing break into switch in construct_value()Juha-Pekka Heikkila2016-04-261-0/+1
| | | | | | | | There seemed to be missing one break in nested switchcases. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Antia Puentes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeonsi: Fix memory leak in error path.Bas Nieuwenhuizen2016-04-261-0/+2
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix build error because of missing paramOded Gabbay2016-04-261-1/+1
| | | | | Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]>
* r600g: use do_endian_swap in texture swapping functionOded Gabbay2016-04-261-1/+34
| | | | | | | | | For some texture formats we need to take "do_endian_swap" into account when configuring their swizzling. Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: use do_endian_swap in color swapping functionsOded Gabbay2016-04-262-8/+14
| | | | | | | | | For some formats we need to take "do_endian_swap" into account when configuring swapping for color buffers. Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: set endianess of 16/32-bit buffers according to do_endian_swapOded Gabbay2016-04-261-4/+13
| | | | | | | | | | | | | | | | | | This patch modifies r600_colorformat_endian_swap(), so for 16-bit and for 32-bit buffers, the endianess configuration will be determined not only by the color/texture format, but also by the do_endian_swap parameter. The only exception is for array formats, which are always set to not do swapping, because for them gallium sets an alias based on the machine's endianess. v4: V_0280A0_COLOR_16_16 and V_0280A0_COLOR_16_16_FLOAT should be set to 8IN16 because the bytes inside need to be swapped even for array formats. Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g/radeonsi: send endian info to format translation functionsOded Gabbay2016-04-267-32/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because r600 GPUs can't do swap in their DB unit, we need to disable endianess swapping for textures that are handled by DB. There are four format translation functions in r600g driver: - r600_translate_texformat - r600_colorformat_endian_swap - r600_translate_colorformat - r600_translate_colorswap This patch adds a new parameters to those functions, called "do_endian_swap". When running in a big-endian machine, the calling functions will check whether the texture/color is handled by DB - "rtex->is_depth && !rtex->is_flushing_texture" - and if so, they will send FALSE through this parameter. Otherwise, they will send TRUE. The translation functions, in specific cases, will look at this parameter and configure the swapping accordingly. v4: evergreen_init_color_surface_rat() is only used by compute and don't handle DB surfaces, so just sent hard-coded FALSE to translation functions when called by it. Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: add ability to use essl 3.20Ilia Mirkin2016-04-254-0/+11
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* main: select ES3.2 version when all extensions are availableIlia Mirkin2016-04-251-1/+17
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi: pass a shader type to the machine create and clean up.Dave Airlie2016-04-265-15/+15
| | | | | | | | | | | | | There was definitely bugs here mixing up the PIPE_ and TGSI_ defines, hopefully they didn't cause any problems, since mostly it was special cases for GEOMETRY. This clarifies at shader machine create what type of shader this machine will execute. This is needed also for compute shaders where we don't want to allocate inputs/outputs. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/tgsi: move tgsi_exec.h header out of draw_context.hDave Airlie2016-04-262-1/+1
| | | | | | | | | It gets annoying that changing the tgsi exec rebuilds the state tracker unnecessarily. Putting this include into draw_gs.h which uses it causes a lot less rebuilds. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallivm: make sampling more robust against bogus coordinatesRoland Scheidegger2016-04-263-13/+43
| | | | | | | | | | | | | | | | | | | | | | Some cases (especially these using fract for coord wrapping) did not handle NaNs (or Infs) correctly - the following code assumed the fract result could not be outside [0,1], but if the input is a NaN (or +-Inf) the fract result was NaN - which then could produce out-of-bound offsets. (Note that the explicit NaN behavior changes for min/max on x86 sse don't result in actual changes in the generated jit code, but may on other architectures. Found by looking through all the wrap functions.) This fixes https://bugs.freedesktop.org/show_bug.cgi?id=94955 No piglit changes. (v2: fix min/max typo in coord_mirror, add comment) Cc: "11.1 11.2" <[email protected]> Tested-by: Bruce Cherniak <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* radeonsi: fix missing include for Elements.Dave Airlie2016-04-261-0/+1
| | | | | | Since u_blitter.h no longer defines this. Signed-off-by: Dave Airlie <[email protected]>
* nvc0: bump the amount of shared memory per MP on MaxwellSamuel Pitoiset2016-04-261-1/+11
| | | | | | | | According to the CUDA compute capability version, GM10x can expose 64KB of shared memory while GM20x can use 96KB. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* r600: fix missing include for Elements macroDave Airlie2016-04-261-0/+1
| | | | | | | This got removed from u_blitter.h and we were taking it from there, this should just move to ARRAY_SIZE eventually. Signed-off-by: Dave Airlie <[email protected]>
* gm107/ir: s/invalid load/invalid store/Samuel Pitoiset2016-04-251-1/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: remove unused fxnRob Clark2016-04-251-6/+0
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: convert over to rallocRob Clark2016-04-252-40/+6
| | | | | | | | | The home-grown heap scheme (which is ultra-simple but probably not good to always allocate and memset such a chunk of memory up front) was a remnant of fdre (where the ir originally came from). But since we have ralloc in mesa, lets just use that instead. Signed-off-by: Rob Clark <[email protected]>
* mesa/st: log some additional invalid-fbo casesRob Clark2016-04-251-0/+3
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* freedreno: honor handle->offsetRob Clark2016-04-251-2/+4
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: disallow cat4 immed srcRob Clark2016-04-251-1/+1
| | | | | | | | Normally this would never happen (constant-propagation in NIR would eliminate the instruction), except it does happen for 'undef' which we turn into immed 0.0 for bookkeeping purposes. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a4xx: add render-target formatsRob Clark2016-04-251-3/+3
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2016-04-255-5/+8
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: reduce line width for deqp furtherRob Clark2016-04-251-1/+1
| | | | | | | | See a7eb12d0.. but that wasn't restrictive enough. Fixes dEQP-GLES3.functional.rasterization.primitives.line_strip_wide, and similar Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix sin/cosRob Clark2016-04-258-1/+92
| | | | | | | | | | We seem to need range reduction to get sane results. Fixes glmark2 jellyfish bench, and a whole bunch of dEQP-GLES3.functional.shaders.builtin_functions.precision.{sin,cos,tan}.* v2: squashed in android build fixes from Rob Herring Signed-off-by: Rob Clark <[email protected]>
* i965: Unroll SIMD16 DDY_FINE on Sandybridge.Kenneth Graunke2016-04-251-1/+5
| | | | | | | | | | | | This fixes 10 dEQP-GLES3 subtests: dEQP-GLES3.functional.shaders.derivate.dfdy.texture.float_nicest.*. Matt noticed that our Piglit tests for this use even numbered registers, while the failing dEQP tests use odd numbered registers. We believe that it works for even numbered registers, but not otherwise. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/gles: Allow format GL_RED to be used with MESA_FORMAT_R_UNORMJordan Justen2016-04-251-0/+2
| | | | | | | | | | | | | | | | If the bound framebuffer has a format of MESA_FORMAT_R_UNORM, then IMPLEMENTATION_COLOR_READ_FORMAT will return GL_RED. This change applies to OpenGLES contexts where additional restrictions are placed on the formats that are allowed to be supported. Fixes OpenGLES 3.1 CTS tests: * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC16 * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC16Linear * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC32F * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC32FLinear Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* svga: eliminiate unnecessary constant buffer updatesCharmaine Lee2016-04-253-2/+23
| | | | | | | | | | | | | | | | | | Currently if the texture binding is changed, emit_fs_consts() is triggered to update texture scaling factor for rectangle texture or texture buffer size in the constant buffer. But the update is only relevant if the texture binding includes a rectangle texture or a texture buffer. To eliminate the unnecessary constant buffer updates due to other texture binding changes, a new flag SVGA_NEW_TEXTURE_CONSTS will be used to trigger fragment shader constant buffer update when a rectangle texture or a texture buffer is bound. With this patch, the number of constant buffer updates in Lightsmark2008 reduces from hundreds per frame to about 28 per frame. Reviewed-by: Brian Paul <[email protected]>
* svga: mark the texture dirty for write transfer map onlyCharmaine Lee2016-04-251-2/+4
| | | | | | | | | Instead of unconditionally mark the texture subresource dirty at transfer map, we'll set the dirty bit for write transfer only. Tested with lightsmark2008 and glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: fix assert with PIPE_QUERY_OCCLUSION_PREDICATE for non-vgpu10Charmaine Lee2016-04-251-23/+20
| | | | | | | | | | With this patch, when running in hardware version 11, we'll use SVGA3D_QUERYTYPE_OCCLUSION query type for PIPE_QUERY_OCCLUSION_PREDICATE and return TRUE if samples-passed count is greater than 0. Fixes glretrace/solidworks2012_viewport running in hardware version 11. Reviewed-by: Brian Paul <[email protected]>
* svga: minimize surface flushCharmaine Lee2016-04-252-15/+85
| | | | | | | | | | | | Currently, we always do a surface flush when we try to establish a synchronized write transfer map. But if the subresource has not been modified, we can skip the surface flush. In other words, we only need to do a surface flush if the to-be-mapped subresource has been modified in this command buffer. With this patch, lightsmark2008 shows about 15% performance improvement. Reviewed-by: Brian Paul <[email protected]>
* glapi: fix _glapi_get_proc_address() for mangled function namesFrederic Devernay2016-04-251-12/+6
| | | | | | | | | | | In the dispatch table, all functions are stored without the "m" prefix. Modify code so that OSMesaGetProcAddress works both with gl and mgl prefixes. Similar to https://lists.freedesktop.org/archives/mesa-dev/2015-September/095251.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94994 Cc: "11.1 11.2" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* util/blitter: use ARRAY_SIZE macroBrian Paul2016-04-251-9/+3
| | | | | | And remove local definition of Elements() macro. Reviewed-by: Marek Olšák <[email protected]>
* svga: s/Elements/ARRAY_SIZE/Brian Paul2016-04-2519-55/+55
| | | | | | Standardize on the later macro rather than a mix of both. Reviewed-by: Charmaine Lee <[email protected]>
* svga: whitespace and formatting fixes in svga_pipe_rasterizer.cBrian Paul2016-04-251-16/+13
|
* svga: whitespace and formatting fixes in svga_pipe_depthstencil.cBrian Paul2016-04-251-14/+14
|
* svga: whitespace and formatting fixes in svga_pipe_sampler.cBrian Paul2016-04-251-31/+33
|
* gallium/util: initialize pipe_framebuffer_state to zerosBrian Paul2016-04-251-1/+1
| | | | | | | | | To silence a valgrind uninitialized memory warning. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94955 Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/cache: add comments, fix formattingBrian Paul2016-04-251-5/+35
|
* i965: Mark URB reads as volatile.Kenneth Graunke2016-04-251-0/+3
| | | | | | | | | | They can be affected by URB writes. In the upcoming scalar TCS backend, this prevents read-modify-write cycles from being broken by CSE removing reads. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* i965: Make a few tessellation related functions non-static.Kenneth Graunke2016-04-253-47/+51
| | | | | | | | Also, move them to brw_shader.cpp so they're in a location for code used by both the vec4 and fs worlds. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* svga: separate HUD counters for state objectsBrian Paul2016-04-257-12/+29
| | | | | | | | | | Count depth/stencil, blend, sampler, etc. state objects separately but just report the sum for the HUD. This change lets us use gdb to see the breakdown of state objects in more detail. Also, count sampler views too. Reviewed-by: Charmaine Lee <[email protected]>
* st/omx: Fix resource leak on OMX_ErrorNoneRobert Foss2016-04-251-0/+1
| | | | | | | | Avoid leaking buffer allocated for task if an error has occured. Coverity id: 1213929 Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* isl: remove ffs function that conflicts with system headersJonathan Gray2016-04-251-5/+1
| | | | | | | | | | | | | Remove a wrapper around __builtin_ffs that conflicts with system headers on OpenBSD and perhaps elsewhere: isl_priv.h:44: error: conflicting types for 'ffs' v2: include strings.h to ensure prototype is found Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: use unreachable instead of assertsGrazvydas Ignotas2016-04-251-1/+1
| | | | | | | Avoids warnings in release builds. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv: fix warnings in release buildGrazvydas Ignotas2016-04-254-4/+4
| | | | | | | | | Mark variables MAYBE_UNUSED to avoid unused-but-set-variable warnings in release build. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* isl: fix warnings in release buildGrazvydas Ignotas2016-04-252-2/+2
| | | | | | | | | Mark variables MAYBE_UNUSED to avoid unused-but-set-variable warnings in release build. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* spirv: fix warning in release buildGrazvydas Ignotas2016-04-251-1/+1
| | | | | | | | Mark variable MAYBE_UNUSED to avoid unused-but-set-variable warning in release build. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: fix warnings in release buildGrazvydas Ignotas2016-04-257-7/+9
| | | | | | | | Mark variables MAYBE_UNUSED to avoid unused-but-set-variable warnings in release build. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Emil Velikov <[email protected]>