summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl/glcpp: Remove some un-needed calls to NEWLINE_CATCHUPCarl Worth2014-07-291-4/+0
| | | | | | | | | | | | | | | | | The NEWLINE_CATCHUP code is only intended to be invoked after we lex an actual newline character ('\n'). The two extra calls here were apparently added accidentally because the pattern happened to contain a (negated) '\n', (see commit 6005e9cb283214cd57038c7c5e7758ba72ec6ac2). I don't think either case could have caused any actual bug. (In the first case, the pattern matched right up to the next newline, so the NEWLINE_CATCHUP code was just about to be called. In the second case, I don't think it's possible to actually enter the <SKIP> start condition after commented newlines without any intervening newline.) But, if nothing else, the code is cleaner without these extra calls. Reviewed-by: Jordan Justen <[email protected]>
* glsl/glcpp: Add support for comments between #define and macro identifierCarl Worth2014-07-293-2/+41
| | | | | | | | | | | | | | | The recent adddition of an error for "#define followed by a non-identifier" was a bit to aggressive since it used a regular expression in the lexer to flag any character that's not legal as the first character of an identifier. But we need to allow comments to appear here, (since we aren't removing comments in a preliminary pass). So we refine the error here to only flag characters that could not be an identifier, nor a comment, nor whitespace. We also augment the existing comment support to be active in the <DEFINE> state as well. Reviewed-by: Jordan Justen <[email protected]>
* glsl/glcpp: Emit proper error for #define with a non-identifierCarl Worth2014-07-293-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if the preprocessor encountered a #define with a non-identifier, such as: #define 123 456 The lexer had no explicit rules to match non-identifiers in the <DEFINE> start state. Because of this, flex's default rule was being invoked, (printing characters to stdout), and all text was being discarded by the compiler until the next identifier. As one can imagine, this led to all sorts of interesting and surprising results. Fix this by adding an explicit rule complementing the existing identifier-based rules that should catch all non-identifiers after #define and reliably give a well-formatted error message. A new test is added to "make check" to ensure this bug stays fixed. This commit also fixes the following Khronos GLES3 CTS test: define_non_identifier_vertex (The "fragment" variant was passing earlier only because the preprocessor was behaving so randomly and causing the compilation to fail. It's lucky, in fact, that the "vertex" version succesfully compiled so we could find and fix this bug.) Reviewed-by: Jordan Justen <[email protected]>
* glsl/glcpp: Add testing for directives preceded by a spaceCarl Worth2014-07-292-0/+43
| | | | | This test simply has one of each directive, all of which are preceded by a single space character.
* glsl/glcpp: Fix to emit spaces following directivesCarl Worth2014-07-292-2/+3
| | | | | | | | | | | | | The glcpp lexer and parser use the space_tokens state bit to avoid emitting tokens for spaces while parsing a directive. Previously, this bit was only being set again by the first non-space token following a directive. This led to a bug where a space, (or a comment that should emit a space), immediately following a directive, (optionally searated by newlines), would be omitted from the output. Here we fix the bug by also setting the space_tokens bit whenever we lex a newline in the standard start conditions.
* configure.ac: require libdrm_radeon 2.4.56 because of the Hawaii fix thereMarek Olšák2014-07-291-1/+1
|
* main/get_hash_params: Add GL_SAMPLE_SHADING_ARBJason Ekstrand2014-07-291-0/+1
| | | | | | | | | | | GL_SAMPLE_SHADING is specified as a valid pname for glGet in the GL_ARB_sample_shading extension. It seems as if we forgot to add it to the table of pnames. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* os_process.c: Add cygwin as an expected platformYaakov Selkowitz2014-07-291-2/+2
| | | | | | | | | | | mesa/mesa/src/gallium/auxiliary/os/os_process.c:40:2: warning: #warning unexpected platform in os_process.c [-Wcpp] #warning unexpected platform in os_process.c mesa/mesa/src/gallium/auxiliary/os/os_process.c:77:2: warning: #warning unexpected platform in os_process.c [-Wcpp] #warning unexpected platform in os_process.c Signed-off-by: Yaakov Selkowitz <[email protected]> Reviewed-by: Jon TURNEY <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* xmlconfig: Use program_invocation_short_name when building for cygwinYaakov Selkowitz2014-07-291-0/+2
| | | | | | | | | mesa/mesa/src/mesa/drivers/dri/common/xmlconfig.c:104:10: warning: #warning "Per application configuration won't work with your OS version." [-Wcpp] # warning "Per application configuration won't work with your OS version." Signed-off-by: Yaakov Selkowitz <[email protected]> Reviewed-by: Jon TURNEY <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* docs: fix date typo: July 78 -> 18Brian Paul2014-07-291-1/+1
|
* svga: remove unneeded depth==1 assertion in svga_texture_view_surface()Brian Paul2014-07-291-1/+0
| | | | | | | We can create 3D texture views. Avoids an assertion in piglit fbo-generatemipmap-3d test and allows it to pass. Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: Clamp wglChoosePixelFormatARB's output nNumFormats to nMaxFormats.José Fonseca2014-07-291-2/+4
| | | | | | | | | | | | | | While running https://github.com/nvMcJohn/apitest with apitrace I noticed that Mesa was producing bogus results: wglChoosePixelFormatARB(hdc, piAttribIList = {...}, pfAttribFList = &0, nMaxFormats = 1, piFormats = {19, 65576, 37, 198656, 131075, 0, 402653184, 0, 0, 0, 0, -573575710}, nNumFormats = &12) = TRUE However https://www.opengl.org/registry/specs/ARB/wgl_pixel_format.txt states <nNumFormats> returns the number of matching formats. The returned value is guaranteed to be no larger than <nMaxFormats>. Cc: "10.2" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/radeon: Add some Emacs .dir-locals.el filesMichel Dänzer2014-07-294-0/+45
| | | | | | Based on the toplevel one but adapted to the driver/winsys coding styles. Reviewed-by: Marek Olšák <[email protected]>
* ilo: fix fb height of HiZ opsChia-I Wu2014-07-291-1/+1
| | | | | It was set to aligned width. It appears to be fine on GEN7+, but causes random hangs on GEN6.
* glapi: add indexed blend functions (GL 4.0)Tapani Pälli2014-07-282-5/+31
| | | | | | | | | | | This makes some of the UE4 engine demos (Stylized, Mobile Temple) render correctly, tested on Intel Haswell machine. Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78716
* r600g,radeonsi: switch all occurences of array_size to util_max_layerMarek Olšák2014-07-283-6/+10
| | | | | | | | | | | | | | | | | | This fixes 3D texture support in all these cases, because array_size is 1 with 3D textures and depth0 actually contains the "array size". util_max_layer is universal and returns the last layer index for any texture target. A lot of the cases below can't actually be hit with 3D textures, but let's be consistent. This fixes a failure in: piglit layered-rendering/clear-color-all-types 3d single_level for r600g and radeonsi, which was caused by an incorrect CMASK size calculation. Cc: [email protected] Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix occlusion queries on HawaiiMarek Olšák2014-07-281-1/+7
| | | | | | | This was just a guess - and it worked! Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: fix vram_size overflow with HawaiiMarek Olšák2014-07-283-5/+7
| | | | | | | This fixes piglit spec/!OpenGL 3.1/minmax. Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: fix a hang with streamout on HawaiiMarek Olšák2014-07-282-1/+14
| | | | | | | | | | | I actually couldn't reproduce this one, but internal docs recommend this workaround. Better safe than sorry. Also, the number of dwords for the sync packets is increased by 4 instead of 2, because it wasn't bumped last time when a new packet was added there. Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: fix a hang with instancing on HawaiiMarek Olšák2014-07-281-1/+15
| | | | | | | This fixes "piglit/bin/arb_transform_feedback2-draw-auto instanced". Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* gallium/util: add a helper for calculating primitive count from vertex countMarek Olšák2014-07-281-0/+15
| | | | | | This is needed by the following commit which is a candidate for stable too. Cc: [email protected]
* radeonsi: fix CMASK and HTILE calculations for HawaiiMarek Olšák2014-07-281-2/+2
| | | | | | | | | | This fixes the checkerboard pattern in glxgears and anything that triggers fast color clear. num_channels is always <= 8, but Hawaii has 16 pipes. Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g,radeonsi: add debug flags which disable tilingMarek Olšák2014-07-283-13/+24
| | | | Reviewed-by: Alex Deucher <[email protected]>
* gallium: rename shader cap MAX_CONSTS to MAX_CONST_BUFFER_SIZEMarek Olšák2014-07-2818-39/+40
| | | | | | | | | | This new name isn't so confusing. I also changed the gallivm limit, because it looked wrong. Reviewed-by: Brian Paul <[email protected]> v2: use sizeof(float[4])
* r600g: switch SNORM conversion to DX and GLES behaviorMarek Olšák2014-07-284-7/+0
| | | | | | | | | it also matches GL 4.2 further discussion: http://lists.freedesktop.org/archives/mesa-dev/2013-August/042680.html Cc: [email protected]
* util: Fix typoTom Stellard2014-07-281-1/+1
| | | | Spotted by okias on IRC.
* ilo: correctly propagate resource renames to hardwareChia-I Wu2014-07-283-14/+30
| | | | | Not only should we mark states dirty when the underlying resource is renamed, we should also update the CSO bo when available.
* ilo: add ilo_resource_get_bo() helperChia-I Wu2014-07-282-17/+18
| | | | We will need it in the following commit.
* radeonsi: Use util_memcpy_cpu_to_le32()Tom Stellard2014-07-282-19/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util: Add util_memcpy_cpu_to_le32() v3Tom Stellard2014-07-281-0/+17
| | | | | | | | | | | v2: - Preserve word boundaries. v3: - Use const and restrict. - Fix indentation. Reviewed-by: Michel Dänzer <[email protected]>
* clover: Add checks for image support to the image functions v2Tom Stellard2014-07-283-0/+12
| | | | | | | | | | Most image functions are required to return a CL_INVALID_OPERATION error when used on devices without image support. v2: - Simplified the code Reviewed-by: Francisco Jerez <[email protected]>
* r600g/compute: Add debug information to promote and demote functionsBruno Jiménez2014-07-281-4/+11
| | | | | | | v2: Add information about the item's starting point and size v3: Rebased on top of master Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Add documentation to compute_memory_poolBruno Jiménez2014-07-282-31/+86
| | | | | | v2: Rebased on top of master Reviewed-by: Tom Stellard <[email protected]>
* ilo: unblock an inline write with a staging boChia-I Wu2014-07-281-13/+31
| | | | This should allow a deeper pipeline.
* ilo: try unblocking a transfer with a staging boChia-I Wu2014-07-284-19/+209
| | | | | | | When mapping a busy resource with PIPE_TRANSFER_DISCARD_RANGE or PIPE_TRANSFER_FLUSH_EXPLICIT, we can avoid blocking by allocating and mapping a staging bo, and emit pipelined copies at proper places. Since the staging bo is never bound to GPU, we give it packed layout to save space.
* ilo: enable persistent and coherent transfersChia-I Wu2014-07-283-8/+35
| | | | Enable PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT and reorder caps a bit.
* ilo: drop ptr from ilo_transferChia-I Wu2014-07-282-35/+36
| | | | | With the recent clean-ups, we can pass the mapped pointer around between functions cleanly. Drop it to make ilo_transfer smaller.
* ilo: s/TRANSFER_MAP_UNSYNC/TRANSFER_MAP_GTT_UNSYNC/Chia-I Wu2014-07-282-6/+6
| | | | | It maps to drm_intel_gem_bo_map_unsynchronized(), which results in unsynchronized GTT mapping.
* ilo: drop unused context param from transfer functionsChia-I Wu2014-07-281-115/+100
| | | | Many of the transfer functions do not need an ilo_context. Drop it.
* ilo: tidy up transfer mapping/unmappingChia-I Wu2014-07-281-88/+89
| | | | | | Add xfer_map() to replace map_bo_for_transfer(). Add xfer_unmap() and xfer_alloc_staging_sys() to simplify texture and buffer mapping/unmapping, and enable more code sharing between them.
* ilo: tidy up choose_transfer_method()Chia-I Wu2014-07-281-84/+164
| | | | | | Add a bunch of helper functions and a big comment for choose_transfer_method(). This also fixes handling of PIPE_TRANSFER_MAP_DIRECTLY to not ignore tiling.
* ilo: free transfers with util_slab_free()Chia-I Wu2014-07-281-1/+1
| | | | We used FREE() in one of the error path.
* clover: Add clUnloadPlatformCompiler.EdB2014-07-282-1/+6
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Add clCreateProgramWithBuiltInKernels.EdB2014-07-282-1/+23
| | | | | | | [ Francisco Jerez: Check for devices not associated with the specified context. Style fix. ] Reviewed-by: Francisco Jerez <[email protected]>
* glsl/cs: Add several GLSL compute shader variablesJordan Justen2014-07-271-0/+6
| | | | | | | | With MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader, this fixes piglit: built-in-constants tests/spec/arb_compute_shader/minimum-maximums.txt Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* main/cs: Add additional compute shader constant valuesJordan Justen2014-07-272-0/+18
| | | | | | | | With MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader, this fixes piglit: * arb_compute_shader-minmax Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* glsl: No longer require ubo block index to be constant in ir_validateChris Forbes2014-07-261-1/+0
| | | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Accept nonconstant array references in lower_ubo_referenceChris Forbes2014-07-261-11/+32
| | | | | | | | | | | | Instead of falling back to just the block name (which we won't find), look for the first element of the block array. We'll deal with the rest in the backend by arranging for the blocks to be laid out contiguously. V2: Squashed together patches 3, 5 of V1, plus a naming tweak. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Convert uniform_block in lower_ubo_reference to ir_rvalue.Chris Forbes2014-07-261-7/+8
| | | | | | | | | | Previously this was a block index with special semantics for -1. With ARB_gpu_shader5, this need not be a compile-time constant, so allow any rvalue here and convert the -1 to a NULL pointer. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Mark entire UBO array active if indexed with non-constant.Chris Forbes2014-07-261-19/+31
| | | | | | | | | Without doing a lot more work, we have no idea which indices may be used at runtime, so just mark them all. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>