summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* kms-swrast: Support Prime fd handlingAndreas Pokorny2014-09-052-11/+79
| | | | | | | | Allows using prime fds as display target and from display target. Test for PRIME capability after initializing kms_swrast screen. Cc: [email protected] Signed-off-by: Andreas Pokorny <[email protected]>
* configure.ac: Add AC_SYS_LARGEFILEMichel Dänzer2014-09-054-6/+12
| | | | | | | Making sure large file support is enabled across the tree even on 32-bit systems. Reviewed-by: Emil Velikov <[email protected]>
* clover/util: Null-terminate the result of compat::string::c_str().Francisco Jerez2014-09-051-1/+3
| | | | Reported-by: EdB <[email protected]>
* clover/util: Implement compat::string using aggregation instead of inheritance.Francisco Jerez2014-09-051-5/+71
|
* clover/util: Have compat::vector track separate size and capacity.Francisco Jerez2014-09-052-27/+44
| | | | | | | In order to make the behaviour of resize() and reserve() closer to the standard. Reported-by: EdB <[email protected]>
* clover: Use conversion operator to initialize build log from compat::string.Francisco Jerez2014-09-051-2/+2
| | | | | | | | Fixes binary garbage in the compilation logs caused by compat::string::c_str() not being null-terminated (which is a bug on its own that will be fixed in another commit). Reported-by: EdB <[email protected]>
* Revert 5 i965 patches: 8e27a4d2, 373143ed, c5bdf9be, 6f56e142, 88e3d404Jordan Justen2014-09-0434-185/+112
| | | | | | | | | | | | | | | | | | | | | | Reverts * "i965: Modify state upload to allow 2 different sets of state atoms." 8e27a4d2b3e4e74e9a77446bce49607433d86be3 * "i965: Modify dirty bit handling to support 2 pipelines." 373143ed9187c4d4ce1e3c486b5dd0880d18ec8b * "i965: Create a macro for checking a dirty bit." c5bdf9be1eca190417998d548fd140c1eca37a54 Conflicts: src/mesa/drivers/dri/i965/brw_context.h * "i965: Create a macro for setting all dirty bits." 6f56e1424d923fd80c84090fbf4506c9eaaffea1 Conflicts: src/mesa/drivers/dri/i965/brw_blorp.cpp src/mesa/drivers/dri/i965/brw_state_cache.c src/mesa/drivers/dri/i965/brw_state_upload.c * "i965: Create a macro for setting a dirty bit." 88e3d404dad009d8cff5124cf8acee7daeaceb64 Signed-off-by: Jordan Justen <[email protected]>
* freedreno/ir3: fix constlen with relative addressingRob Clark2014-09-043-3/+15
| | | | | | | | We can't rely on the value from the assembler if relative addressing is used. So instead use the max of declared-consts (which does not include compiler immediates) and what we get from the assembler (which does). Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix error in bail logicRob Clark2014-09-041-2/+4
| | | | | | | | | | | all_delayed will also be true if we didn't attempt to schedule anything due to no more instructions using current addr/pred. We rely on coming in to block_sched_undelayed() to detect and clean up when there are no more uses of the current addr/pred, which isn't necessarily an error. This fixes a regression introduced in b823abed. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: bit of debugRob Clark2014-09-041-4/+16
| | | | | | Make it easier to figure out which compiler stage failed. Signed-off-by: Rob Clark <[email protected]>
* vc4: Merge qcompile and tgsi_to_qirEric Anholt2014-09-049-402/+327
| | | | | | The split between these two didn't make much sense. I'm going to want the chance to look at uniform contents in optimization passes, and the QPU emit I think is going to end up rewriting the uniforms stream.
* i965/fs: Use prog rather than fp->Base in fs_visitorJordan Justen2014-09-042-15/+15
| | | | | | | Reduce fs_visitor's dependence on gl_fragment_program. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Use stage_prog_data instead of prog_data->base in fs_visitorJordan Justen2014-09-041-6/+6
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add init function to fs_visitorJordan Justen2014-09-042-0/+7
| | | | | | | | This common init routine can be used by constructors for multiple program types. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* vc4: Add a CSE optimization pass.Eric Anholt2014-09-044-0/+238
| | | | | | Debugging a regression in discard support was just too full of duplicate instructions, so I decided to remove them instead of re-analyzing each of them as I dumped their outputs in simulation.
* vc4: Switch to using native integers.Eric Anholt2014-09-045-6/+228
| | | | | | | There were troubles with bools without using native integers (st_glsl_to_tgsi seemed to think bool true was 1.0f sometimes, when as a uniform it's stored as ~0), and since I've got native integers other than divide, I might as well just support them.
* vc4: Expose compares at a lower level in QIR.Eric Anholt2014-09-045-79/+148
| | | | | | | | | | | | Before, we had some special opcodes like CMP and SNE that emitted multiple instructions. Now, we reduce those operations significantly, giving optimization more to look at for reducing redundant operations. The downside is that QOP_SF is pretty special -- we're going to have to track it separately when we're doing instruction scheduling, and we want to peephole it into the instruction generating the destination write in most cases (and not allocate the destination reg, probably. Unless it's used for some other purpose, as well).
* vc4: Stop being so clever in CMP handling.Eric Anholt2014-09-041-23/+6
| | | | | This kind of cleverness should be in a general merging-of-ADD-and-MUL instruction scheduler, rather than individual opcodes.
* state_tracker: Fix bug in conditional discards with native ints.Eric Anholt2014-09-041-2/+12
| | | | | | | | | A bool is 0 or ~0, and KILL_IF takes a float arg that's <0 for discard or >= 0 for not. By negating it, we ended up doing a floating point subtract of (0 - ~0), which ended up as an inf. To make this actually work, we need to convert the bool to a float. Reviewed-by: Brian Paul <[email protected]>
* swrast: s/INLINE/inline/Brian Paul2014-09-041-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* osmesa: s/INLINE/inline/Brian Paul2014-09-041-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* xlib: s/INLINE/inline/Brian Paul2014-09-041-3/+3
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* meta: s/INLINE/inline/Brian Paul2014-09-041-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* 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]>