summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-11-04gallivm: fix sampling for s3tc srgb formats when using texture cacheRoland Scheidegger1-1/+3
This actually stored the values as 8bit linear values in the cache, then did another srgb->linear conversion... We don't want to do the former (decoding 8bit srgb values to 8bit linear completely defeats the purpose of srgb in the first place), so just decode to 8bit srgb. Fixes piglit.spec.ext_texture_srgb.texwrap formats-s3tc tests.
2015-11-03i965/meta: Assert fast clears and rep clears never overlapBen Widawsky1-0/+2
There is nothing wrong with the code today, but as one modifies the code it turns out to be not too difficult to mess up the code, and this easy assertion should catch such driver implementation failures quickly. Cc: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Chad Versace <chad.versace@intel.com> Reviewed-by: Neil Roberts <neil@linux.intel.com>
2015-11-04mesa: expose support for GL_EXT_buffer_storageRyan Houdek3-0/+11
This extension requires ES 3.1 since it relies on glMemoryBarrier. For testing purposes I temporarily moved glMemoryBarrier to be an ES 3.0 function. This has been tested with the piglit in the ML and the Dolphin emulator. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-11-04glsl: make sure to only add subroutines to resource listTimothy Arceri1-1/+2
Over looked in 763cd8c080353. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-11-04glsl: remove old TODOTimothy Arceri1-5/+0
SSBO support now exists as of commits f24e5e and f408a13dd30. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Matt Turner <mattst88@gmail.com>
2015-11-04docs: Mark AoA as done for i965Timothy Arceri2-2/+3
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-11-04i965: enable ARB_arrays_of_arraysTimothy Arceri1-0/+1
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2015-11-04i965: add support for image AoATimothy Arceri2-14/+18
V3: clamp array index to the correct size (the size of the current array rather than the inner array) Francisco Jerez. V2: avoid useless zero-initialization and addition for the first AoA level, avoid redundant temporary, make use of type_size_scalar(), rename aoa_size to element_size, assign the indirect indexing temporary directly to image.reladdr, and replace while loop with a for loop. All suggested by Francisco Jerez. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-11-04llvmpipe: add cache for compressed texturesRoland Scheidegger19-18/+730
compressed textures are very slow because decoding is rather complex (and because there's no jit code code to decode them too for non-technical reasons). Thus, add some texture cache which holds a couple of decoded blocks. Right now this handles only s3tc format albeit it could be extended to work with other formats rather trivially as long as the result of decode fits into 32bit per texel (ideally, rgtc actually would decode to more than 8 bits per channel, but even then making it work for it shouldn't be too difficult). This can improve performance noticeably but don't expect wonders (uncompressed is unsurprisingly still faster). It's also possible it might be slower in some cases (using nearest filtering for example or if there's otherwise not many cache hits, the cache is only direct mapped which isn't great). Also, actual decode of a block relies on util code, thus even though always full blocks are decoded it is done texel by texel - this could obviously benefit greatly from simd-optimized code decoding full blocks at once... Note the cache is per (raster) thread, and currently only used for fragment shaders. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-11-04llvmpipe: use simple coeffs calc for 128bit vectorsOded Gabbay1-1/+6
There are currently two methods in llvmpipe code to calculate coeffs to be used as inputs for the fragment shader. The two methods use slightly different ways to do the floating point calculations and thus produce slightly different results. The decision which method to use is determined by the size of the vector that is used by the platform. For vectors with size of more than 128bit, a single-step method is used, in which coeffs_init_simple() + attribs_update_simple() are called. For vectors with size of 128bit or less, a two-step method is used, in which coeffs_init() + attribs_update() are called. This causes some piglit tests (clip-distance-bulk-copy, interface-vs-unnamed-to-fs-unnamed) to fail when using platforms with 128bit vectors (such as ppc64le or x86-64 without AVX). This patch makes platforms with 128bit vectors use the single-step method (aka "simple" method) instead of the two-step method. This would make the resulting coeffs identical between more platforms, make sure the piglit tests passes, and make debugging and maintainability a bit easier as the generated LLVM IR will be the same for more platforms. The performance impact is negligible for x86-64 without AVX, and basically non-existent for ppc64le, as it can be seen from the following benchmarking results: - glxspheres, on ppc64le: - original code: 4.892745317 frames/sec 5.460303857 Mpixels/sec - with the patch: 4.932083873 frames/sec 5.504205571 Mpixels/sec - Additional 0.8% performance boost - glxspheres, on x86-64 without AVX: - original code: 20.16418809 frames/sec 22.50323395 Mpixels/sec - with the patch: 20.31328989 frames/sec 22.66963152 Mpixels/sec - Additional 0.74% performance boost - glmark2, on ppc64le: - original code: score of 58 - with my change: score of 57 - glmark2, on x86-64 without AVX: - original code: score of 175 - with the patch: score of 167 - Impact of of -4.5% on performance - OpenArena, on ppc64le: - original code: 3398 frames 1719.0 seconds 2.0 fps 255.0/505.9/2773.0/0.0 ms - with the patch: 3398 frames 1690.4 seconds 2.0 fps 241.0/497.5/2563.0/0.2 ms - 29 seconds faster with the patch, which is about 2% - OpenArena, on x86-64 without AVX: - original code: 3398 frames 239.6 seconds 14.2 fps 38.0/70.5/719.0/14.6 ms - with the patch: 3398 frames 244.4 seconds 13.9 fps 38.0/71.9/697.0/14.3 ms - 0.3 fps slower with the patch (about 2%) Additional details can be found at: http://lists.freedesktop.org/archives/mesa-dev/2015-October/098635.html Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-11-03nir: Properly invalidate metadata in nir_opt_remove_phis().Kenneth Graunke1-0/+5
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Cc: mesa-stable@lists.freedesktop.org
2015-11-03nir: Properly invalidate metadata in nir_lower_vec_to_movs().Kenneth Graunke1-0/+5
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Cc: mesa-stable@lists.freedesktop.org
2015-11-03nir: Properly invalidate metadata in nir_opt_copy_prop().Kenneth Graunke1-0/+6
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Cc: mesa-stable@lists.freedesktop.org
2015-11-03nir: Properly invalidate metadata in nir_remove_dead_variables().Kenneth Graunke1-2/+8
v2: Preserve live_variables too (Jason). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
2015-11-03nir: Properly invalidate metadata in nir_split_var_copies().Kenneth Graunke1-0/+5
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Cc: mesa-stable@lists.freedesktop.org
2015-11-03nir: Properly invalidate metadata in nir_lower_global_vars_to_local().Kenneth Graunke1-0/+3
v2: Preserve nir_metadata_live_variables as well (caught by Jason). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
2015-11-03nir: Unexpose _impl versions of copy_prop and dceJason Ekstrand3-4/+2
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-11-03mesa: rename UniformBlockStageIndex to InterfaceBlockStageIndexJordan Justen7-21/+22
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Cc: Iago Toral <itoral@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
2015-11-03i965/vec4: Send from GRF in atomic operations.Matt Turner1-12/+18
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-11-04gallium/radeon: allow returning SDMA fences from pipe->flushMarek Olšák1-8/+56
pipe->flush never returned SDMA fences. This fixes it. This is only an issue on amdgpu where fences can signal out of order. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-11-04gallium/radeon: always return the last SDMA fence on SDMA flush if neededMarek Olšák2-4/+8
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-11-03i965: Add scalar geometry shader support.Kenneth Graunke5-24/+666
This is hidden behind INTEL_SCALAR_GS=1 for now, as we don't yet support instanced geometry shaders, and Orbital Explorer's shader spills like crazy. But the infrastructure is in place, and it's largely working. v2: Lots of rebasing. v3: (feedback from Kristian Høgsberg) - Handle stride and subreg_offset correctly for ATTRs; use a helper. - Fix missing emit_shader_time_end() call. - Delete dead code after early EOT in static vertex case to avoid tripping asserts in emit_shader_time_end(). - Use proper D/UD type in intexp2(). - Fix "EndPrimitve" and "to that" typos. - Assert that invocations == 1 so we know this is missing. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2015-11-03i965: Add scalar GS input lowering code.Kenneth Graunke1-5/+39
We really ought to compute the VUE map at link time and stash it, rather than recomputing it here, but with the mess of program structures I wasn't sure where to put it. We can improve that later. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2015-11-03i965: Fix the fs_visitor GS constructor to take shader_time_index.Kenneth Graunke2-3/+5
Jason reworked this so it isn't simply ST_GS anymore...it's either -1 (not enabled) or an actual offset. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2015-11-03i965/gen8+: Extract color clear surface stateBen Widawsky1-6/+15
On future generation platforms the color clear value is stored elsewhere in the surface state. By extracting this logic, we can cleanly implement the difference in an upcoming patch. Should have no functional impact. v2: Move hunk from the next patch into this patch (Matt) Whitespace fix (Ben) Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Neil Roberts <neil@linux.intel.com>
2015-11-03i965/gen8+: Remove redundant zeroing of surface stateBen Widawsky1-12/+0
The allocate_surface_state already zeroes out the surface state, and doing it later in the function is destructive for what we want to accomplish when we split out support for gen9 fast clears (next patch). NOTE: Only dword 12 actually needed to be fixed, but it seemed more consistent to remove the other instances as well. I can make an argument both ways (open coding it, vs. not). I can rework the next patch if requires. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Chad Versace <chad.versace@intel.com> Reviewed-by: Neil Roberts <neil@linux.intel.com>
2015-11-03nvc0: add missing compute parameters required by cloverSamuel Pitoiset1-1/+10
This fixes crashes with some piglit OpenCL tests. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-11-03nvc0: handle NULL pointer in nvc0_get_compute_param()Samuel Pitoiset1-24/+21
To get the size (in bytes) of a compute parameter, clover first calls get_compute_param() with a NULL data pointer. The RET() macro is based on nv50. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-11-03i965/skl: PCI ID cleanup and brand stringsBen Widawsky1-15/+19
A few new PCI ids are added here, and one is removed (0x190B) because it no longer seems to exist anywhere. v2-4: Only use ascii characters (Ilia) 0x1921 is no longer marked as f Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2015-11-03i965/skl: Add GT4 PCI IDsBen Widawsky2-1/+9
Like other gen8+ hardware, the hardware automatically scales up thread counts. We must be careful about the URB sizes since GT4 adds another slice. One of the existing PCI IDs is actually mislabeled as GT3. Arguably this is a real bug since the URB size will be wrong. Because this patch is simply meant to add the missing IDs, that will be fixed in a later patch. v2: No longer relevant. v3: Update the wm thread count to support GT4. The WM thread count is used to determine the maximum scratch space required. Currently the code always allocates the maximum amount even though lower GT SKUs require less. The formula is threads_per_psd * subslices_per_slice * slices Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2015-11-02mesa: Add spec citations for DispatchCompute*Jordan Justen1-5/+29
Note: The OpenGL 4.3 - 4.5 specification language for DispatchCompute appears to have an error regarding the max allowed values. When adding the specification citation, we note why the code does not match the specification language. v2: * Updates based on review from Iago Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Iago Toral Quiroga <itoral@igalia.com> Cc: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2015-11-02mesa: Update DispatchComputeIndirect errors for indirect parameterJordan Justen1-6/+5
There is some discrepancy between the return values for some error cases for the DispatchComputeIndirect call in the ARB_compute_shader specification. Regarding the indirect parameter, in one place the extension spec lists that the error returned for invalid values should be INVALID_OPERATION, while later it specifies INVALID_VALUE. The OpenGL 4.3 and OpenGLES 3.1 specifications appear to be consistent in requiring the INVALID_VALUE error return in this case. Here we update the code to match the main specifications, and update the citations use the main specification rather than the extension specification. v2: * Updates based on review from Iago Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Iago Toral Quiroga <itoral@igalia.com> Cc: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2015-11-02i965/fs: Clean up FBH code.Matt Turner1-4/+3
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-11-02i965/vec4: Clean up FBH code.Matt Turner1-13/+5
It did a bunch of unnecessary stuff, emitting an extra MOV included. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-11-02i965: Replace default case with list of enum values.Matt Turner5-26/+29
If we add a new file type, we'd like to get warnings if it's not handled. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-11-02i965/vec4: Don't disable channels in any/all comparisons.Matt Turner1-42/+10
We've made a mistake in calling the Channel Enable bits "writemask", because they do more than control which channels of the destination are written -- they actually control which channels are enabled (surprise! surprise!) So, if we emit cmp.z.f0(8) null.xy<1>D g10<4,4,1>.xyzzD g2<0,4,1>.xyzzD mov(8) g12<1>.xUD 0x00000000UD (+f0.all4h) mov(8) g12<1>.xUD 0xffffffffUD where the CMP instruction has only .xy channel enables, it won't write the .zw channels of the flag register, which are of course read by the +f0.all4 predicate. We need to always emit CMP instructions whose flag result might be read by such a predicate with all channels enabled. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2015-11-02mesa: fix uniforms calculation in glGetProgramivTapani Pälli1-2/+12
Since introduction of SSBO, UniformStorage contains not just uniforms but also buffer variables, this needs to be taken in to account when calculating active uniforms with GL_ACTIVE_UNIFORMS and GL_ACTIVE_UNIFORM_MAX_LENGTH. No Piglit regressions. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2015-11-02mesa: fix program resource queries for atomic counter buffersTapani Pälli1-2/+26
gl_active_atomic_buffer contains index to UniformStorage, we need to calculate resource index for that gl_uniform_storage. Fixes following CTS tests: ES31-CTS.program_interface_query.atomic-counters ES31-CTS.program_interface_query.atomic-counters-one-buffer No Piglit regressions. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2015-11-02glsl: join calculate_array_size() and calculate_array_stride()Juha-Pekka Heikkila1-110/+80
These helpers are ran for same case the same loop. Here joined their operation so the loop is ran just once. Also fixed out-of-memory condition here. v2: Make the loop simpler to read as per Tapani's suggestion Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Tested-by: Tapani Pälli <tapani.palli@intel.com>
2015-11-01mesa: expose support for OES/EXT_draw_elements_base_vertex to OpenGL ESRyan Houdek6-7/+106
This has been tested with the piglits in the mailing list and on the Dolphin emulator. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-11-01nouveau: set MaxDrawBuffers to the same value as MaxColorAttachmentsIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org
2015-11-01nv50: use correct heaps for FP and GP code segmentsSamuel Pitoiset1-2/+2
This is just a cosmetic change. Trivial. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2015-11-01mesa/sso: Add compute shader supportJordan Justen2-1/+12
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com> [itoral@igalia.com: Reviewed-by for all except the ctx->_Shader change] Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-11-01mesa/sso: Add MESA_VERBOSE=api trace supportJordan Justen1-0/+33
v2: * Use %u for unsigned values (Iago) Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-11-01i965: Setup pull constant state for compute programsJordan Justen4-1/+35
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-11-01main/get: Add MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTSJordan Justen1-0/+1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2015-10-31glsl: OpenGLES GLSL 3.1 precision qualifiers ordering rulesJordan Justen1-2/+4
The OpenGLES GLSL 3.1 specification uses the precision qualifier ordering rules from ARB_shading_language_420pack. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2015-10-31glsl: Add compute shader builtin variables for OpenGLES 3.1Jordan Justen1-1/+1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2015-10-31nouveau: get rid of tabsIlia Mirkin19-607/+607
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-10-31i965/sched: don't calculate live intervals for post-RA schedulingConnor Abbott1-1/+2
For some reason, this causes assertions on gm965 only. In any case, it's unnecessary since we don't need liveness information in the post-RA scheduler. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92744 Cc: Mark Janes <mark.a.janes@intel.com> Signed-off-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>