aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: s/INLINE/inline/Brian Paul2014-09-043-5/+5
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* r600g,radeonsi: make sure there's enough CS space before resuming queriesMarek Olšák2014-09-041-0/+28
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83432 Cc: "10.2 10.3" <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* mesa: invalidate draw state in glPopClientAttribMarek Olšák2014-09-041-0/+4
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82538 Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* Revert "r600g,radeonsi: initialize HTILE to fully-expanded state"Marek Olšák2014-09-041-3/+1
| | | | | | | | This reverts commit f05fe294e7e8dfb08be172f426252192c0ba17ab. Apparently the hw doesn't like this. Revert to the "cleared" state. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83418
* winsys/svga: Fix incorrect type usage in IOCTL v2Thomas Hellstrom2014-09-041-4/+9
| | | | | | | | | | | | | | | While similar in layout, the size of the SVGA3dSize type may be smaller than the struct drm_vmw_size type that is part of the ioctl interface. The kernel driver could accordingly overwrite a memory area following the size variable on the stack. Typically that would be another local variable, causing breakage in, for example, ubuntu 12.04.5 where the handle local variable becomes overwritten. v2: Fix whitespace errors Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Cc: "10.1 10.2 10.3" <[email protected]>
* glapi: Add KHR_debug functions to check_table testTimothy Arceri2014-09-041-0/+6
| | | | Signed-off-by: Timothy Arceri <[email protected]>
* egl: Restrict multiplication in calloc arguments to use compile-time constantsCarl Worth2014-09-032-2/+2
| | | | | | | | | | | | | | | As explained in the previous commit, we want to avoid the possibility of integer-multiplication overflow while allocating buffers. In these two cases, the final allocation size is the product of three values: one variable and two that are fixed constants at compile time. In this commit, we move the explicit multiplication to involve only the compile-time constants, preventing any overflow from that multiplication, (and allowing calloc to catch any potential overflow from the remainining implicit multiplication). Reviewed-by: Matt Turner <[email protected]>
* Eliminate several cases of multiplication in arguments to callocCarl Worth2014-09-0311-17/+17
| | | | | | | | | | | | | | | | | | | | | | In commit 32f2fd1c5d6088692551c80352b7d6fa35b0cd09, several calls to _mesa_calloc(x) were replaced with calls to calloc(1, x). This is strictly equivalent to what the code was doing previously. But for cases where "x" involves multiplication, now that we are explicitly using the two-argument calloc, we can do one step better and replace: calloc(1, A * B); with: calloc(A, B); The advantage of the latter is that calloc will detect any overflow that would have resulted from the multiplication and will fail the allocation, (whereas the former would return a small allocation). So this fix can change potentially exploitable buffer overruns into segmentation faults. Reviewed-by: Matt Turner <[email protected]>
* glsl: Report progress from opt_copy_propagation_elements().Kenneth Graunke2014-09-031-0/+1
| | | | | | | It's been altering the tree and reporting "false" since January 2011. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Skip rewriting instructions in opt_cpe when unnecessary.Kenneth Graunke2014-09-031-0/+10
| | | | | | | | | | | | Previously, opt_copy_propagation_elements would always rewrite the instruction stream, even if was the same thing as before. In order to report progress correctly, we'll need to bail if the suggested replacement is identical (or equivalent) to the original code. This also introduced unnecessary noop swizzles, as far as I can tell. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Initialize source_chan in opt_copy_propagation_elements.Kenneth Graunke2014-09-031-1/+1
| | | | | | | | | | | Previously, if chans < 4, we passed uninitialized stack garbage to the ir_swizzle constructor for the excess components. Thankfully, it ignores that data, as it's unnecessary, so no harm actually comes of it. However, it's obviously better to initialize it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Handle ir_triop_csel in emit_bool_to_cond_code().Kenneth Graunke2014-09-032-4/+36
| | | | | | | | | | | ir_triop_csel can return a boolean expression, so we need to handle it here; we simply forgot when we added it. Fixes Piglit's EXT_shader_integer_mix/{vs,fs}-mix-if-bool. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: [email protected]
* i965: Move curb_read_length/total_scratch to brw_stage_prog_data.Kenneth Graunke2014-09-0316-38/+40
| | | | | | | | All shader stages have these fields, so it makes sense to store them in the common base structure, rather than duplicating them in each. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* build: Rename md5 to checksums as part of .PHONY targetCarl Worth2014-09-031-1/+1
| | | | | | | | | In commit 46d03d37bf3a75e86f9f8ab56c6a939d04f23383 I renamed a Makefile target from md5 to checksums, (as we switched from MD5 checksums to SHA-256 checksums, so the more general name is more future proof). But that commit missed one mention of "md5" as a dependency of the .PHONY target. Rename that here as well.
* glsl: fix assertion which fails for unsigned array indices.tiffany2014-09-031-1/+1
| | | | | | | | | According to the GLSL 1.40 spec, section 5.7 Structure and Array Operations: "Array elements are accessed using an expression whose type is int or uint." Cc: <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/copy_image: Divide the x offsets by block width when using the blitterJason Ekstrand2014-09-031-10/+21
| | | | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Cc: "10.3" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82804 Tested-by: Tapani Pälli <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/copy_image: Use the correct block dimensionJason Ekstrand2014-09-031-6/+6
| | | | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Cc: "10.3" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82804 Tested-by: Tapani Pälli <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* meta/copy_image: Use the correct texture level when creating viewsJason Ekstrand2014-09-031-1/+1
| | | | | | | | | | | | | | Previously, we were accidentally assuming that the level of both textures was 0. Now we actually use the correct level in our hacked texture view. This doesn't 100% fix the meta path because the texture type is getting lost somewhere in the pipeline. However, it actually copies to/from the correct layer now. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "10.3" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82804 Tested-by: Tapani Pälli <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/copy_image: Use the correct texture levelJason Ekstrand2014-09-031-4/+6
| | | | | | | | | | | | Previously, we were using the source images level for both source and destination. Also, we weren't taking the MinLevel from a potential texture view into account. This commit fixes both problems. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "10.3" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82804 Tested-by: Tapani Pälli <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* gallivm: Fix build against LLVM SVN >= r216982Michel Dänzer2014-09-032-0/+11
| | | | | | | Only MCJIT is available anymore. Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* r600g: fix alpha-test with HyperZ enabled, fixing L4D2 tree corruptionMarek Olšák2014-09-031-6/+6
| | | | | | | | | | | *_update_db_shader_control depends on the alpha test state. The problem was it was in a block which is only entered if the pixel shader is changed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74863 Cc: [email protected] Tested-by: Benjamin Bellec <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: Preserve existing buffer flagsMichel Dänzer2014-09-031-3/+3
| | | | | | | | The default case was accidentally clearing RADEON_FLAG_CPU_ACCESS from the previous fall-through cases. Reported-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* main: Don't leak temporary texture rowsJason Ekstrand2014-09-021-0/+4
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* r300g: pointless assignment of info.indexedDave Airlie2014-09-031-2/+0
| | | | | | | Did this code mean to do something else, you tell me! Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* omx/h264: remove stray semicolon after ifDave Airlie2014-09-031-1/+1
| | | | | | | Coverity reported this, looks wrong to me. Reviewed-by: Christian König <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vdpau: unlock the mutex on error paths in attribute setting.Dave Airlie2014-09-031-12/+26
| | | | | | | | Coverity pointed out we never dropped the lock here, so fix it by using a common exit path. Reviewed-by: Christian König <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* u_primconvert: Use u_upload_mgr for our little IB allocations.Eric Anholt2014-09-021-11/+9
| | | | | | | | tex-miplevel-selection was hammering my memory manager with primconverts on individual quads. This gets all those converted IBs packed into larger IBs. Reviewed-by: Rob Clark <[email protected]>
* u_primconvert: Shut up compiler warning.Eric Anholt2014-09-021-1/+1
| | | | | | | gcc isn't detecting that src is set before used, since both are under if (info->indexed). Reviewed-by: Rob Clark <[email protected]>
* gbm: Fix gallium build when X11 is in a non-system directoryEric Anholt2014-09-021-0/+1
| | | | | | | pipe-loader.h will include Xlib.h when HAVE_PIPE_LOADER_XLIB is set in the build. Reviewed-by: Emil Velikov <[email protected]>
* vc4: Handle a couple of the transfer map flags.Eric Anholt2014-09-022-4/+12
| | | | | | This is part of fixing extremely long runtimes on some piglit tests that involve streaming vertex reuploads due to format conversions, and will similarly be important for X performance, which relies on these flags.
* meta: Make MESA_META_DRAW_BUFFERS restore properlyKristian Høgsberg2014-09-021-34/+4
| | | | | | | | | | | | | | | | | | | | A meta begin/end pair with MESA_META_DRAW_BUFFERS will change visible GL state. We recreate the draw buffer enums from the buffer bitfield, which changes GL_BACK to GL_BACK_LEFT (and GL_FRONT to GL_FRONT_LEFT). This commit modifes the save/restore logic to instead copy the buffer enums from the gl_framebuffer and then set them on restore using _mesa_drawbuffers(). It's not clear how this breaks the benchmark in 82796, but fixing meta to not leak the state change fixes the regression. No piglit regressions. Reviewed-by: Kenneth Graunke <[email protected]> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=82796 Signed-off-by: Kristian Høgsberg <[email protected]> Cc: [email protected]
* Revert "mesa: fix make tarballs"Emil Velikov2014-09-022-3/+1
| | | | | | | | | | | | | | | | This reverts commit 0fbb9a599df898d4e1166d6d6f00cb34a0524bea. Rather than adding hacks around the issue drop the sources from the final tarball, and re-add them back with 'make dist'. This fixes a problem when running parallel 'make install' fails as it recreates sources and triggers partial recompilation. Cc: "10.2 10.3" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83355 Reported-by: Maarten Lankhorst <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Maarten Lankhorst <[email protected]> Tested-by: Kai Wasserbäch <[email protected]>
* mesa/program_cache: calloc the correct size for the cache.Dave Airlie2014-09-021-1/+1
| | | | | | | | | Coverity reported this, and I think this is the right solution, since cache->items is struct cache_item ** not struct cache_item *, we also realloc it using struct cache_item * at some point. Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: Compile dummy pixel shader on demandMichel Dänzer2014-09-022-8/+10
| | | | | | It's never used under normal circumstances. Reviewed-by: Marek Olšák <[email protected]>
* u_blitter: Create all shaders on demandMichel Dänzer2014-09-021-43/+104
| | | | | | | Not all of these are used in every context, so this can make a significant difference for short-lived contexts such as in piglit tests. Reviewed-by: Marek Olšák <[email protected]>
* r600g,radeonsi: Inform the kernel if a BO will likely be accessed by the CPUMichel Dänzer2014-09-023-11/+23
| | | | | | | This allows the kernel to prevent such BOs from ever being stored in the CPU inaccessible part of VRAM. Reviewed-by: Marek Olšák <[email protected]>
* glsl: free uniform_map on failure path.Dave Airlie2014-09-021-1/+3
| | | | | | | | | If we fails in reserve_explicit_locations, we leak uniform_map. Reported-by: coverity scanner. Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* main/cs: Add gl_context::ComputeProgramPaul Berry2014-09-011-0/+15
| | | | Reviewed-by: Jordan Justen <[email protected]>
* mesa: Convert NewDriverState to 64-bitsJordan Justen2014-09-016-13/+25
| | | | | | | i965 will have more than 32 bits when BRW_STATE_COMPUTE_PROGRAM is added. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* i965: Modify state upload to allow 2 different sets of state atoms.Paul Berry2014-09-012-25/+32
| | | | | | | The set of state atoms for compute shaders is currently empty; it will be filled in by future patches. Reviewed-by: Jordan Justen <[email protected]>
* i965: Modify dirty bit handling to support 2 pipelines.Paul Berry2014-09-014-16/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The hardware state for compute shaders is almost entirely orthogonal to the hardware state for 3D rendering. To avoid sending unnecessary state to the hardware, we'll need to have a separate set of state atoms for the compute pipeline and the 3D pipeline. That means we need to maintain two separate sets of dirty bits to determine which state atoms need to be run. But the dirty bits are not completely independent; for example, if BRW_NEW_SURFACES is flagged while doing 3D rendering, then not only do we need to re-run 3D state atoms that depend on BRW_NEW_SURFACES, but we also need to re-run compute state atoms that depend on BRW_NEW_SURFACES. But we'll also need to re-run those state atoms the next time the compute pipeline is run. To accomplish this, we record two sets of dirty bits, one for each pipeline. When bits are dirtied (via SET_DIRTY_BIT() or SET_DIRTY_ALL()) we set them to the dirty state in both pipelines. When brw_state_upload() is run, we clear the dirty bits just for the pipeline that was run. Note that since the number of pipelines is known at compile time to be 2, the compiler should unroll the loops in SET_DIRTY_BIT() and SET_DIRTY_ALL(). Reviewed-by: Jordan Justen <[email protected]>
* i965: Create a macro for checking a dirty bit.Paul Berry2014-09-012-1/+7
| | | | | | | This will make it easier to extend dirty bit handling to support compute shaders. Reviewed-by: Jordan Justen <[email protected]>
* i965: Create a macro for setting all dirty bits.Paul Berry2014-09-014-7/+18
| | | | | | | This will make it easier to extend dirty bit handling to support compute shaders. Reviewed-by: Jordan Justen <[email protected]>
* i965: Create a macro for setting a dirty bit.Paul Berry2014-09-0132-67/+74
| | | | | | | This will make it easier to extend dirty bit handling to support compute shaders. Reviewed-by: Jordan Justen <[email protected]>
* i965: add missing parens in vec4 visitorDave Airlie2014-09-021-1/+2
| | | | | | | | | coverity reported this, Matt said it look like missing parens, not bad identing, so lets try that. Cc: "10.2 10.3" <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nouveau: don't leak dec struct on errorDave Airlie2014-09-021-1/+1
| | | | | | | This one path doesn't goto fail, so it seems to leak dec. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* xvmc/tests: %C isn't a valid printf specifier.Dave Airlie2014-09-021-2/+2
| | | | | | Reported-by: Coverity scanner. Signed-off-by: Dave Airlie <[email protected]>
* nouveau/nv40: quiten coverity warning in unused vertex texture code.Dave Airlie2014-09-021-0/+1
| | | | | | This fixes the code, but we never run it anyways, so silence coverity. Signed-off-by: Dave Airlie <[email protected]>
* nv50: remove unused variablesIlia Mirkin2014-09-012-2/+0
| | | | | | Recent code changes have caused these to no longer be used. Remove them. Signed-off-by: Ilia Mirkin <[email protected]>
* mesa: force height of 1D textures to be 1 in texture viewsIlia Mirkin2014-09-011-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Chris Forbes <[email protected]>