aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Pass gl_shader_compiler_optimizations to unroll_loops().Kenneth Graunke2014-04-113-9/+16
| | | | | | | Loop unrolling will need to know a few more options in the future. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* glsl: Drop do_common_optimization's max_unroll_iterations parameter.Kenneth Graunke2014-04-118-16/+8
| | | | | | | | | | | | Now that we pass in gl_shader_compiler_options, it makes sense to just use options->MaxUnrollIterations, rather than passing a separate parameter. Half of the invocations already passed options->MaxUnrollIterations, while the other half passed in a hardcoded value of 32. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* i965: Use EmitNoIndirect flags in lower_variable_index_to_cond_assign.Kenneth Graunke2014-04-111-8/+7
| | | | | | | This will prevent the two from getting out of sync again. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* i965: Correct EmitNoIndirect shader compiler option flags.Kenneth Graunke2014-04-111-3/+2
| | | | | | | | These were out of sync with the flags used to control lower_variable_index_to_cond_assign in brw_shader.cpp. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* i965/fs: Reset reg_from when we can't coalesce.Matt Turner2014-04-111-0/+1
| | | | | | | | | | | | Not setting this would prevented coalescing after a failed attempt if the sources for both MOVs were the same. total instructions in shared programs: 1654531 -> 1650224 (-0.26%) instructions in affected programs: 423167 -> 418860 (-1.02%) GAINED: 2 LOST: 0 Reviewed-by: Eric Anholt <eric@anholt.net>
* i965: Fill in a bunch of gen7/hsw data cache-related disasm.Eric Anholt2014-04-111-7/+103
| | | | | | | | This gets us disasm of atomic ops. v2: Fix fallthrough on pre-gen7. (bug caught by Ilia Mirkin). Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Stop setting up a 1:1 "attrib" member in our vertex inputs.Eric Anholt2014-04-114-5/+2
| | | | | | | | | It's just the array index, so we can just go look at the array and see which element we are. No significant performance difference (n=140) Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* i965: Skip a bunch of IB BO refcount twiddling.Eric Anholt2014-04-111-13/+13
| | | | | | Improves cairo performance on glamor by 1.64828% +/- 1.04742% (n=65). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* i965/gen7: Skip repeated NULL depth/stencil state emits.Eric Anholt2014-04-114-0/+20
| | | | | | Improves cairo performance on glamor by 2.87752% +/- 0.966977 (n=57). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* docs: Fix ubo indexing descriptionChris Forbes2014-04-121-1/+1
| | | | | | | Ian points out that this being unrestricted was an oversight in the spec, and is corrected in GLSL4.40. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
* draw: remove unused 'start' variable in draw_stats_clipper_primitives()Brian Paul2014-04-111-5/+2
| | | | | | It was computed, but never actually used. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Try vectorizing when seeing a repeated assignment to a channel.Kenneth Graunke2014-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | When considering assignment expressions like: v.x += u.x; v.x += u.x; the vectorizer would incorrectly keep going, attempting to find more instructions to vectorize. It would overwrite the saved assignment to point at the second one, and increment channels a second time, resulting in try_vectorize thinking the expression was a vec2 instead of a float. Instead, if we see a repeated assignment to a channel, just try to vectorize everything we've found so far. This clears the saved state so it will start over. Fixes Piglit's repeated-channel-assignments.vert. Cc: "10.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* glsl: Propagate explicit binding information from the AST all the way to the ↵Ian Romanick2014-04-114-2/+30
| | | | | | | | | | | | | | | | | linker Information about the binding was not being properly communicated from the front-end compiler to the linker. As a result, the linker never knew that any UBOs had explicit bindings! Fixes the piglit test arb_shading_language_420pack-binding-layout. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: github@socker.lepus.uberspace.de [v0] Cc: "10.1" <mesa-stable@lists.freedesktop.org> Cc: github@socker.lepus.uberspace.de
* linker: Set binding for all elements of UBO arrayIan Romanick2014-04-111-2/+34
| | | | | | | | | | | | | | | | | | Previously, a UBO like layout(binding=2) uniform U { ... } my_constants[4]; wouldn't get any bindings set. The code would try to set the binding of U, but that would fail. It should instead set the bindings for U[0], U[1], ... Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.1" <mesa-stable@lists.freedesktop.org> Cc: github@socker.lepus.uberspace.de
* linker: Set block bindings based on UniformBlocks rather than UniformStorageIan Romanick2014-04-111-11/+21
| | | | | | | | | | | | | | | | | | | For blocks, gl_shader_program::UniformStorage isn't very useful. The names stored there are the names of the elements of the block, so finding blocks with an instance name is hard. There is also only one entry in ::UniformStorage for each element of a block array, and that is a deal breaker. Using ::UniformBlocks is what _mesa_GetUniformBlockIndex does. I contemplated sharing code between set_block_binding and _mesa_GetUniformBlockIndex, but building the stand-alone compiler and the unit tests make this hard. I plan to return to this effort shortly. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.1" <mesa-stable@lists.freedesktop.org> Cc: github@socker.lepus.uberspace.de
* linker: Clean up "unused parameter" warningsIan Romanick2014-04-111-8/+4
| | | | | | | | | | | | | ../../src/glsl/link_uniform_initializers.cpp:87:1: warning: unused parameter 'mem_ctx' [-Wunused-parameter] ../../src/glsl/link_uniform_initializers.cpp:87:1: warning: unused parameter 'type' [-Wunused-parameter] ../../src/glsl/link_uniform_initializers.cpp:127:1: warning: unused parameter 'mem_ctx' [-Wunused-parameter] ../../src/glsl/link_uniform_initializers.cpp:127:1: warning: unused parameter 'type' [-Wunused-parameter] Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.1" <mesa-stable@lists.freedesktop.org> Cc: github@socker.lepus.uberspace.de
* linker: Fold set_uniform_binding into call siteIan Romanick2014-04-111-21/+12
| | | | | | | | | | | | | | | | In the next patch, we'll see that using gl_shader_program::UniformStorage is not correct for uniform blocks. That means we can't use ::UniformStorage to select between the sampler path and the block path. Instead we want to just use the type of the variable. That's never passed to set_uniform_binding, and it's easier to just remove the function (especially for later patches in the series) than to add another parameter. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.1" <mesa-stable@lists.freedesktop.org> Cc: github@socker.lepus.uberspace.de
* linker: Various trivial clean-ups in set_sampler_bindingIan Romanick2014-04-111-18/+18
| | | | | | | | | | | | | | | - Remove the spurious block left from the previous commit and re-indent. - Constify elements. - Make the spec reference in the code look like other spec references in the compiler. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.1" <mesa-stable@lists.freedesktop.org> Cc: github@socker.lepus.uberspace.de
* linker: Split set_uniform_binding into separate functions for blocks and ↵Ian Romanick2014-04-111-3/+39
| | | | | | | | | | | | | | | | | | samplers The two code paths are quite different, and there are some problems in the handling of uniform blocks. Future changes will cause these paths to diverge further. Ultimately, selecting between the two functions will happen at the set_uniform_binding call site, and set_uniform_binding will be deleted. NOTE: This patch just moves code around. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.1" <mesa-stable@lists.freedesktop.org> Cc: github@socker.lepus.uberspace.de
* softpipe: fix shadow samplingHeinrich Janzing2014-04-111-68/+51
| | | | | | | | And remove nonsensical approximation of linear interpolation behavior for shadow samplers. Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
* softpipe: add PIPE_CAP_MIN/MAX_TEXTURE_GATHER_OFFSET query casesBrian Paul2014-04-111-0/+3
| | | | | | To silence compiler warnings. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: use _mesa_get_srgb_format_linear() in sRGB texstore functionsBrian Paul2014-04-111-25/+5
| | | | | | | Instead of switch statements. Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* swrast: use macros to initialize texfetch_funcs[] tableBrian Paul2014-04-111-937/+172
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* swrast: fix more fetch_texel function namesBrian Paul2014-04-112-37/+37
| | | | | | | | | | These were missed/typo'd in the previous patch series: s/R8G8B8A/R8G8B8A8/ s/rgba_16/RGBA_UNORM16/ s/rgba_uint/RGBA_UINT/ s/rgba_int/RGBA_SINT/ Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* egl-static: Fix missing radeon_surface.h includes.José Fonseca2014-04-111-0/+16
| | | | | | | | | | Fixes fatal error: radeon_surface.h: No such file or directory when libdrm is not present, or non-Linux OSes. Trivial.
* gallium/radeon: fix missing winsys include in pipe-loader.Knut Andre Tidemann2014-04-114-1/+4
| | | | | | | | | | | The commit 3b0b44f7def0acb4f7a7aef086c0bece321418a6 introduced a build error: error: dereferencing pointer to incomplete type This patch fixes this issue in all the affected files. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
* st/omx/enc: separate input buffer private and task structureChristian König2014-04-112-59/+127
| | | | | | | Keep tasks as linked list, this way we can associate more than one encoding task with each buffer. Signed-off-by: Christian König <christian.koenig@amd.com>
* radeon/vce: implement B-frame supportChristian König2014-04-112-22/+53
| | | | | Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
* radeon/vce: add proper CPB backtrackChristian König2014-04-113-23/+123
| | | | | | Remember what frames we encoded at which position. Signed-off-by: Christian König <christian.koenig@amd.com>
* vl: add interface for H264 B-frame encodingChristian König2014-04-113-6/+16
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* radeon/vce: remove RVCE_NUM_CPB_EXTRA_FRAMESChristian König2014-04-113-4/+2
| | | | | | Doesn't seems to be needed any more. Signed-off-by: Christian König <christian.koenig@amd.com>
* docs/relnotes: Fix consistency, add i965 to ARB_buffer_storage.Chris Forbes2014-04-111-2/+2
| | | | Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
* i965: Fix missing _NEW_SCISSOR in Broadwell SF_CLIP_VIEWPORT state.Kenneth Graunke2014-04-101-2/+2
| | | | | | | | | | | | | The _Xmin/_Xmax/_Ymin/_Ymax values need to be guarded by _NEW_SCISSOR. Fixes Piglit's scissor-many, and rendering in GNOME Shell. Hopefully fixes similar issues with Unity and ChromeOS. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75879 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: James Ausmus <james.ausmus@intel.com> Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
* mesa/st: set min/max texture gather offset to driver-reported valueIlia Mirkin2014-04-101-0/+3
| | | | | | | | It was always getting set to -8/7 unconditionally. Use the driver-reported value instead. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium: add a way to query min/max texture gather offsetsIlia Mirkin2014-04-1013-0/+30
| | | | | | | | Defaults to providing the same offsets as MIN/MAX_TEXEL_OFFSET. For nvc0, the offset can be -32/31. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* configure.ac: require libdrm_radeon 2.4.53Marek Olšák2014-04-101-1/+1
| | | | We need latest radeon_drm.h.
* winsys/radeon: fix a race condition in initialization of radeon_winsys::screenMarek Olšák2014-04-109-114/+39
| | | | | | | | Create the screen in the winsys while the mutex is locked. This also results in a nice code cleanup! Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* winsys/radeon: fix a race condition between winsys_create and winsys_destroyMarek Olšák2014-04-106-24/+33
| | | | | | | | | This also hides the reference count from drivers. v2: update the reference count while the mutex is locked in winsys_create Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* winsys/radeon: fix a race condition between 2 calls to radeon_winsys_createMarek Olšák2014-04-101-3/+17
| | | | | | | This fixes random crashes of: piglit/glx-multithread-shader-compile. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* winsys/radeon: remove unused radeon_info variables, move backend_mapMarek Olšák2014-04-104-7/+9
| | | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* winsys/radeon: unify radeon_bo::flink and radeon_bo::nameMarek Olšák2014-04-102-14/+10
| | | | | | | Both contained the GEM flink name. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* winsys/radeon: remove definitions already present in radeon_drm.hMarek Olšák2014-04-104-205/+5
| | | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* winsys/radeon: handle squared micro tiling from GEM_GET_TILINGMarek Olšák2014-04-101-0/+2
| | | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* gallium/u_gen_mipmap: rewrite using pipe->blit (v2)Marek Olšák2014-04-106-566/+81
| | | | | | | | | | | | | | | This replaces u_gen_mipmap with an extremely simple implementation based on pipe->blit. st/mesa is also cleaned up. Pros: - less code - correct mipmap generation for NPOT 3D textures (u_blitter uses a better formula) - queries are not affected by mipmap generation if drivers disable them v2: add "first_layer", "last_layer" parameters, drop "face" v2.1: add format v2.2: document the format parameter
* st/mesa: properly implement MapTextureImage with multiple mapped slices (v2)Marek Olšák2014-04-103-21/+53
| | | | | | | | | This is needed by _mesa_generate_mipmap. This adds an array of pipe_transfers to st_texture_image. Each transfer is for mapping a single layer. v2: allocate the array of transfers on demand
* mesa: remove the MALLOC, CALLOC and FREE macrosBrian Paul2014-04-101-6/+0
| | | | | | | | | | No longer used anywhere. These also caused trouble in the Gallium state tracker code where we include both core Mesa and Gallium util headers (and the macros were defined differently in each world.) Removing these macros should help avoid macro mix-ups in the future. Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* xlib: s/FREE/free/Brian Paul2014-04-101-1/+1
| | | | | Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: s/FREE/free/ in vdpau codeBrian Paul2014-04-101-4/+4
| | | | | | Reviewed-by: Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Christian König <christian.koenig@amd.com>
* mesa: s/FREE/free/ in _mesa_free_errors_data()Brian Paul2014-04-101-1/+1
| | | | | Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: use malloc/free instead of MALLOC/FREE in attrib stack codeBrian Paul2014-04-101-10/+10
| | | | | | | We moved away from MALLOC/FREE in the rest of core Mesa a while ago. Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>