summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-08-14st/clover: Fix build against LLVM 3.8 SVN r244928HEADmasterMichel Dänzer1-0/+2
raw_svector_ostream::flush() is now unnecessary and forbidden: CXX llvm/libclllvm_la-invocation.lo ../../../../../src/gallium/state_trackers/clover/llvm/invocation.cpp: In function 'clover::module {anonymous}::build_module_llvm(llvm::Module*, unsigned int (&)[7])': ../../../../../src/gallium/state_trackers/clover/llvm/invocation.cpp:574:29: error: use of deleted function 'void llvm::raw_svector_ostream::flush()' bitcode_ostream.flush(); ^ In file included from /home/daenzer/src/llvm-git/llvm/include/clang/Basic/VirtualFileSystem.h:22:0, from /home/daenzer/src/llvm-git/llvm/include/clang/Basic/FileManager.h:20, from /home/daenzer/src/llvm-git/llvm/include/clang/Basic/SourceManager.h:38, from /home/daenzer/src/llvm-git/llvm/include/clang/Frontend/CompilerInstance.h:16, from ../../../../../src/gallium/state_trackers/clover/llvm/invocation.cpp:25: /home/daenzer/src/llvm-git/llvm/include/llvm/Support/raw_ostream.h:512:8: note: declared here void flush() = delete; ^ Makefile:862: recipe for target 'llvm/libclllvm_la-invocation.lo' failed Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-08-14mesa: set correct error for non-renderable multisample texturesTapani Pälli1-3/+10
v2: same common error on gles31 and desktop OpenGL (spotted by Erik Faye-Lund) Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com> Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
2015-08-13i965/skl: Remove early platform supportBen Widawsky1-10/+0
We do not want bug reports from this early stepping of SKL. Few if any were ever shipped outside of Intel to early enabling partners, and none will be sold. There is a functional change here. If you're using new mesa on an old kernel/libdrm, the revid will be -1, and we'll use new SKL values instead of early ones (a hopefully irrelevant improvement IMO). v2: Remove hunk which warned before dying. Instead, default to normal SKL support (Ken) Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Neil Roberts <neil@linux.intel.com>
2015-08-13egl: improve attribute checking for eglCreateContextFrank Binns1-1/+32
The EGL 1.4 spec states for eglCreateContext: "attribute EGL_CONTEXT_CLIENT_VERSION is only valid when the current rendering API is EGL_OPENGL_ES_API" Additionally, if the EGL_KHR_create_context EGL extension is supported (this is mandatory in EGL 1.5) then the EGL_CONTEXT_MAJOR_VERSION_KHR, which is an alias for EGL_CONTEXT_CLIENT_VERSION, and EGL_CONTEXT_MINOR_VERSION_KHR attributes are also accepted by eglCreateContext with the extension spec stating: "The values for attributes EGL_CONTEXT_MAJOR_VERSION_KHR and EGL_CONTEXT_MINOR_VERSION_KHR specify the requested client API version. They are only meaningful for OpenGL and OpenGL ES contexts, and specifying them for other types of contexts will generate an error." Add the necessary checks against the extension and rendering APIs when validating these attributes as part of eglCreateContext. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Matt Turner <mattst88@gmail.com> [Emil Velikov: Add newline before the spec quote (Matt)] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-13egl: don't allow eglGetConfigs to set num_configs param to a negative valueFrank Binns1-0/+3
When a buffer is provided to eglGetConfigs it's supposed to set the value of the num_config parameter to the total number of configs that have been copied into this buffer. For some reason the EGL spec doesn't consider it to be an error to pass this function a buffer while specifying its size to be less than 0. Given this, one would expect this combination to result in the num_config parameter being set to 0 but this wasn't the case. This was due to the buffer size being copied straight into num_configs without being clamped to 0. This was causing the following dEQP EGL test to fail: dEQP-EGL.functional.query_config.get_configs.get_configs_bounds Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-13egl/x11: don't abort when creating a DRI2 drawable failsFrank Binns1-1/+19
When calling either eglCreateWindowSurface or eglCreatePixmapSurface it was possible for an application to be aborted as a result of it failing to create a DRI2 drawable on the server. This could happen due to an application passing in an invalid native drawable handle, for example. v2: Handle the case where an error has been set on the connection Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-13egl/x11: set EGL_BAD_NATIVE_(PIXMAP|WINDOW) for invalid pixmaps/windowsFrank Binns1-4/+12
Both eglCreatePixmapSurface and eglCreateWindowSurface were incorrectly setting the EGL error to be EGL_BAD_ALLOC when an invalid native drawable handle was being passed in. The EGL spec states the following for eglCreatePixmapSurface: "If pixmap is not a valid native pixmap handle, then an EGL_BAD_- NATIVE_PIXMAP error should be generated." (eglCreateWindowSurface has similar text) Correctly set the EGL error value based on xcb_get_geometry_reply returning an error structure containing something other than BadAlloc. v2: Check for BadAlloc error and update commit message to reflect this Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-13egl/x11: fix use of EGL_BAD_NATIVE_WINDOWFrank Binns1-4/+7
Commit 4ed23fd590 introduced some calls to _eglError inappropriately passing it EGL_BAD_NATIVE_WINDOW. This was actually harmless in two of the cases as _eglError gets called later on with a more appropriate error code but (just to be safe) switch these to _eglLog calls instead. The final case is a little trickier as it actually needs to set an error of which the following are available (according to the EGL spec): EGL_BAD_MATCH, EGL_BAD_CONFIG, EGL_BAD_NATIVE_(PIXMAP|WINDOW) and EGL_BAD_ALLOC. Of these, EGL_BAD_ALLOC seems to be the most appropriate given that failure can occur either as a result of xcb_get_setup failing due to an earlier error on the connection (where the most commonly occurring error code is XCB_CONN_CLOSED_MEM_INSUFFICIENT) or as a result of the xcb_screen_iterator_t 'rem' field being 0. In addition to this, commit af2aea40d2 unconditionally set the error to EGL_BAD_NATIVE_WINDOW when creating a window or pixmap surface with a NULL native handle. Change this to correctly set the error based on surface type. v2: Updated patch description (Emil Velikov) Return EGL_BAD_NATIVE_PIXMAP when eglCreatePixmapSurface is called with a NULL native pixmap handle Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-13mesa: remove extern from texture functionTimothy Arceri2-10/+1
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-08-13glsl: make linker error message more informativeTimothy Arceri1-2/+3
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-08-13i965: Stop aux data compare preventing program binary re-useTopi Pohjolainen1-32/+20
Items in the program cache consist of three things: key, the data representing the instructions and auxiliary data representing uniform storage. The data consisting of instructions is stored into a drm buffer object while the key and the auxiliary data reside in malloced section. Now the cache uploading is equipped with a check that iterates over existing items and seeks to find a another item using identical instruction data than the one being just uploaded. If such is found there is no need to add another section into the drm buffer object holding identical copy of the existing one. The item just being uploaded should instead simply point to the same offset in the underlying drm buffer object. Unfortunately the check for the matching instruction data is coupled with a check for matching auxiliary data also. This effectively prevents the cache from ever containing two items that could share a section in the drm buffer object. The constraint for the instruction data and auxiliary data to match is, fortunately, unnecessary strong. When items are stored into the cache they will anyway contain their own copy of the auxiliary data (even if they matched - which they in real world never will). The only thing the items would be sharing is the instruction data and hence we should only check for that to match and nothing else. No piglit regression in jenkins. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-08-13i965: Only write program to cache when it doesn't exist yetTopi Pohjolainen1-7/+7
Current logic re-writes the same data when existing data is found. Not that this actually matters at the moment in practice, the contraint for finding matching data is too severe to ever allow data to be shared between two items in the cache. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-08-13i965: Rename brw_upload_item_data to brw_alloc_item_dataTopi Pohjolainen1-9/+10
and simplify the interface to take directly the size and to return the offset. The routine does nothing more than allocate, it doesn't upload anything. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-08-13mesa: update MaxShaderStorageBlockSize to 2^27Tapani Pälli1-1/+1
Extension spec originally required 2^24 but 2^27 is the minimum value required by OpenGL 4.5 and OpenGL ES 3.1 specifications. Fixes: ES31-CTS.shader_storage_buffer_object.basic-max Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-08-13mesa: fix name returned for XFB varyingsTapani Pälli1-4/+16
_mesa_get_program_resource_name has logic to append '[0]' in name if variable is an array, this should be skipped for XFB varyings that have array index already appended. v2: fix comment, change also GL_NAME_LENGTH query to match the behaviour Fixes: ES31-CTS.program_interface_query.transform-feedback-types Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2015-08-13mesa: Fix printf format specifier warn of the ptrdiff_tEdward O'Callaghan1-1/+1
See §7.19.6.1, paragraph 7 of the ISO C specification. Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2015-08-13r600g: allow setting geometry shader sampler statesMarek Olšák1-5/+0
We were ignoring them. This is both hilarious and sad. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Edward O'Callaghan <eocallaghan at alterapraxis.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-13r600g: fix polygon offset scaleMarek Olšák2-2/+2
The value was copied from r300g, which uses 1/12 subpixels, but this hw uses 1/16 subpixels. Should fix piglit: gl-1.4-polygon-offset (formerly a glean test) (untested, ported from radeonsi) Reviewed-by: Edward O'Callaghan <eocallaghan at alterapraxis.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: mesa-stable@lists.freedesktop.org
2015-08-13radeonsi: fix polygon offset scaleMarek Olšák1-1/+1
The value was copied from r300g, which uses 1/12 subpixels, but this hw uses 1/16 subpixels. Fixes piglit: gl-1.4-polygon-offset (formerly a glean test) Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Cc: mesa-stable@lists.freedesktop.org
2015-08-13radeonsi: enable VS_OUT_MISC_SIDE_BUS_ENAMarek Olšák1-0/+1
This is recommended for better performance. Diag tests always enable this. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-13radeonsi: add support for gl_PrimitiveID in the fragment shaderMarek Olšák4-9/+49
It must be obtained from the VS. The GS scenario A must be enabled for PrimID to be generated for the VS. + 4 piglits Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-13radeonsi: move VGT_GS_MODE to the VS stateMarek Olšák1-2/+6
The VS will want to select GS scenario A here (VS with PrimitiveID). Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-12freedreno/a4xx: format updatesRob Clark1-4/+4
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12freedreno/a3xx+a4xx: add texture buffer object supportRob Clark7-11/+41
Basic texture buffer support. Should be straightforward to add first/ last_element support. And with a bit of work in ir3 emulate larger texture buffer sizes. But this seems to be enough for stk gl31 render paths. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12ttn: add buffer texture typeRob Clark1-0/+3
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12freedreno/ir3: 'keeps' need neighbors found tooRob Clark1-0/+5
This shows up with a glamor shader, which does a TXF and uses the result for conditional kill. Before we wouldn't group the fanin (collect) neighbors which need to be allocated adjacently at RA, resulting in badness. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12freedreno/ir3/print: print left/right neighbors tooRob Clark1-0/+14
When debugging compiler, this is useful to see. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12freedreno/ir3: use nir pass to lower const to scalarRob Clark1-0/+1
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12freedreno/a4xx: point-size and spritelist fixesRob Clark7-50/+46
a4xx needs similar treatment as 995f55a6 Also fixup a few point-size and vpsrepl issues and drop fix_blit_fp() hack previously needed for mem2gmem. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12freedreno: cap cleanupsRob Clark2-16/+16
Move a few things around to group stuff that is common to a3xx/a4xx together. Also, introduce is_ir3() for things that are more specific to the compiler / shader-ISA than to the gpu generation. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-12mesa: add NV_read_{depth,stencil,depth_stencil} extensionsRob Clark2-9/+42
These extensions allow reading depth/stencil for GLES contexts, which is useful for tools like apitrace. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-08-12i965/shader: Don't use OptimizeForAOS for NIR vec4 vertex shadersJason Ekstrand1-1/+1
Shader-db results for vec4 programs using NIR on HSW: total instructions in shared programs: 1838157 -> 1828469 (-0.53%) instructions in affected programs: 275978 -> 266290 (-3.51%) helped: 2827 HURT: 244 GAINED: 0 LOST: 0 Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
2015-08-12mesa/teximage: report the correct function which triggered the errorNanley Chery1-4/+4
This function would always report that a dimension or size error occurred in glTexImage even when it was called from glCompressedTexImage. Replace the static string with the dynamically determined caller name. Reviewed-by: Tapani Palli <tapani.palli@intel.com> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
2015-08-12mesa/formats: don't byteswap when building array formatsOded Gabbay1-11/+3
Because we build here an array format, we don't need to swap the bytes for big endian. If it isn't an array format, the bytes will be swapped in _mesa_format_convert. v2: remove temp variable Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-08-12mesa/formats: Don't flip channels of null array formatsJason Ekstrand1-1/+2
Before, if we encountered an array format of 0 on a BE system, we would flip all the channels even though it's an invalid format. This would result in a mostly invalid format with a swizzle of yyyy or wwww. Instead, we should just return 0 if the array format stashed in the format info is invalid. Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org>
2015-08-12mesa/formats: Fix swizzle flipping for big-endian targetsJason Ekstrand1-4/+12
The swizzle defines where in the format you should look for any given channel. When we flip the format around for BE targets, we need to change the destinations of the swizzles, not the sources. For example, say the format is an RGBX format with a swizzle of xyz1 on LE. Then it should be wzy1 on BE; however, the code as it was before, would have made it 1zyx on BE which is clearly wrong. Reviewed-by: Iago Toral <itoral@igalia.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org>
2015-08-12mesa/formats: Only do byteswapping for packed formatsJason Ekstrand1-3/+3
Reviewed-by: Iago Toral <itoral@igalia.com> Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org>
2015-08-11configure.ac: Always define __STDC_LIMIT_MACROS.Matt Turner1-1/+1
... which ensures that we get defines like LONG_MAX in C++. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91591 Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-08-11i965: Optimize brw_inst_set_bits() and brw_compact_inst_set_bits().Matt Turner1-4/+4
Cuts about 2k of .text. text data bss dec hex filename 5017141 197160 27672 5241973 4ffc75 i965_dri.so before 5014981 197160 27672 5239813 4ff405 i965_dri.so after Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-08-11i965: Optimize brw_inst_bits() and brw_compact_inst_bits().Matt Turner1-4/+4
Cuts about 1k of .text. text data bss dec hex filename 5018165 197160 27672 5242997 500075 i965_dri.so before 5017141 197160 27672 5241973 4ffc75 i965_dri.so after Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-08-11docs: add news item and link release notes for 10.6.4Emil Velikov2-0/+7
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-11docs: add sha256 checksums for 10.6.4Emil Velikov1-1/+2
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 99793e2541510fe208d29e69fedf97a6fff006f8)
2015-08-11docs: add release notes for 10.6.4Emil Velikov1-0/+136
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 6b2fcee64edadbd4db2293f5f4fc1a70e80c7251)
2015-08-11gallium/radeon: fix r600g build if LLVM is disabledMarek Olšák1-4/+5
MESA_LLVM_VERSION_PATCH is undefined. Reviewed-by: Edward O'Callaghan <eocallaghan at alterapraxis.com> Tested-by: Benjamin Bellec <b.bellec@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-11r600g: use a bitfield to track dirty atomsGrazvydas Ignotas4-10/+56
r600 currently has 73 atoms and looping through their dirty flags has become costly because checking each flag requires a pointer dereference before the read. To avoid having to do that add additional bitfield which can be checked really quickly thanks to tzcnt instruction. id field was added to struct r600_atom but that doesn't affect memory usage for both 32 and 64 bit CPUs because it was stuffed into padding. The performance improvement is ~2% for benchmarks that can have FPS in the thousands but is hardly measurable in "real" programs. Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2015-08-11r600g: don't mark unused atom dirtyGrazvydas Ignotas1-1/+3
On evergreen config_state is not used, so don't mark it dirty. Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2015-08-11r600g: use a helper to add an initialized atomGrazvydas Ignotas4-8/+16
Instead of writing to rctx->atoms directly use a helper to take advantage of assert checks. Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2015-08-11gallium/radeon: use helper functions to mark atoms dirtyGrazvydas Ignotas19-145/+182
This is analogous to r300_mark_atom_dirty() used by r300, and will be used by later patches. For common radeon code, appropriate helper is called through a function pointer. No functional changes. Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2015-08-11docs: Mark ARB_shader_image_load_store as done on i965.Francisco Jerez2-1/+2
2015-08-11i965: Expose ARB_shader_image_load_store.Francisco Jerez1-0/+1
Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>