summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965: Handle SYSTEM_VALUE_VERTEX_ID_ZERO_BASEIan Romanick2014-09-121-0/+1
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 9975792abd8be891bbe7245cb1d5c347dff65465)
* mesa: Fix glGetActiveAttribute for gl_VertexID when lowered.Kenneth Graunke2014-09-121-1/+13
| | | | | | | | | | | | | | The lower_vertex_id pass converts uses of the gl_VertexID system value to the gl_BaseVertex and gl_VertexIDMESA system values. Since gl_VertexID is no longer accessed, it would not be considered active. Of course, it should be, since the shader uses gl_VertexID. v2: Move the var->name dereference past the var != NULL check. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (cherry picked from commit 26e949b26effe741f9792e3efcba31c7209f3465)
* mesa: Replace string comparisons with SYSTEM_VALUE enum checks.Kenneth Graunke2014-09-121-2/+2
| | | | | | | | This is more efficient. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (cherry picked from commit 26c9514155bfcd1cf2cfeb2cfdb5d4b78a8072b0)
* glsl: Add a lowering pass for gl_VertexIDIan Romanick2014-09-126-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | Converts gl_VertexID to (gl_VertexIDMESA + gl_BaseVertex). gl_VertexIDMESA is backed by SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, and gl_BaseVertex is backed by SYSTEM_VALUE_BASE_VERTEX. v2: Put the enum in struct gl_constants and propoerly resolve the scope in C++ code. Fix suggested by Marek. v3: Reabase on Matt's foreach_in_list changes (was using foreach_list). v4 (Ken): Use a systemvalue instead of a uniform because STATE_BASE_VERTEX has been removed. v5: Use a boolean to select lowering, and only allow one lowering method. Suggested by Ken. v6 (Ken): Replace strcmp against literal "gl_BaseVertex"/"gl_VertexID" with SYSTEM_VALUE enum checks, for efficiency. v7: Rebase on context constant initialization work. Signed-off-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> (cherry picked from commit ec08b5e768271aa100be87c1ca6dd2b0109049d9)
* glsl/linker: Make get_main_function_signature publicIan Romanick2014-09-122-4/+8
| | | | | | | | | The next patch will use this function in a different file. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (cherry picked from commit 04d3323d4b7b7cae4954d80946f0ca202770dd14)
* mesa: Add SYSTEM_VALUE_BASE_VERTEXIan Romanick2014-09-122-1/+15
| | | | | | | | | | This system value represents the basevertex value passed to glDrawElementsBaseVertex and related functions. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (cherry picked from commit 1e87fbd78f15f262b3dd2cbc16099e9f484c42a0)
* mesa: Add SYSTEM_VALUE_VERTEX_ID_ZERO_BASEIan Romanick2014-09-122-0/+13
| | | | | | | | | | | | | There exists hardware, such as i965, that does not implement the OpenGL semantic for gl_VertexID. Instead, that hardware does not include the value of basevertex in the gl_VertexID value. SYSTEM_VALUE_VERTEX_ID_ZERO_BASE is the system value that represents this semantic. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (cherry picked from commit 5964a4f344fa4fd631bcccf67c065b9e66b94108)
* mesa: Document SYSTEM_VALUE_VERTEX_ID and SYSTEM_VALUE_INSTANCE_IDIan Romanick2014-09-121-0/+57
| | | | | | | | | | v2: Additions to the documentation for SYSTEM_VALUE_VERTEX_ID. Quote the GL_ARB_shader_draw_parameters spec and mention DirectX SV_VertexID. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (cherry picked from commit 9afb5ae8cae4460b87a5c03da3955f2e83434430)
* i965/vec4: Reswizzle sources when necessary.Matt Turner2014-09-102-11/+25
| | | | | | | | | | | Despite the comment above the function claiming otherwise, the function did not reswizzle sources, which would lead to bad code generation since commit 04895f5c, which began claiming we could do such swizzling when we could not. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82932 Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 1ee1d8ab468cafd25cfcc513319f3f046492947f)
* nv50/ir: avoid array overrun when checking for supported modsIlia Mirkin2014-09-092-2/+2
| | | | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 874a9396c5adfdcff63139bf6ababb55c1253402)
* i965: Handle ir_binop_ubo_load in boolean expression code.Kenneth Graunke2014-09-092-4/+4
| | | | | | | | | | | | | | | | | | | | UBO loads can be boolean-valued expressions, too, so we need to handle them in emit_bool_to_cond_code() and emit_if_gen6(). However, unlike most expressions, it doesn't make sense to evaluate their operands, then do something with the results. We just want to evaluate the UBO load as a whole---which performs the read from memory---then load the boolean result into the flag register. Instead of adding code to handle it, we can simply bypass the ir_expression handling, and fall through to the default code, which will do exactly that. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83468 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: [email protected] (cherry picked from commit a20cc2796f5d55e49956ac0bc5d61ca027eec7f9)
* i965: Handle ir_triop_csel in emit_if_gen6().Kenneth Graunke2014-09-092-4/+33
| | | | | | | | | | | | | ir_triop_csel can return a boolean expression, so we need to handle it here; we simply forgot when we added ir_triop_csel, and forgot again when adding it to emit_bool_to_cond_code. Fixes Piglit's EXT_shader_integer_mix/{vs,fs}-mix-if-bool on Sandybridge. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: [email protected] (cherry picked from commit 6272e60ca394a8da178d3352831a48f4c429a3bc)
* gallivm: Fix Altivec pack intrinsics for little-endianUlrich Weigand2014-09-081-5/+21
| | | | | | | | | | | | | | | | | | | | | | This patch fixes use of Altivec pack intrinsics on little-endian PowerPC systems. Since little-endian operation only affects the load and store instructions, the semantics of pack (and other) instructions that take two input vectors implicitly change: the pack instructions still fill a register placing values from the first operand into the "high" parts of the register, and values from the second operand into the "low" parts of the register, but since vector loads and stores perform an endian swap, the high parts end up at high memory addresses. To still achieve the desired effect, we have to swap the two inputs to the pack instruction on little-endian systems. This is done automatically by the back-end for instructions generated by LLVM, but needs to be done manually when emitting intrisincs (which still result in that instruction being emitted directly). Signed-off-by: Ulrich Weigand <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> (cherry picked from commit 0feb977bbfb0d6bb2c8d3178246acb035a739f37) Nominated-by: Maarten Lankhorst <[email protected]>
* mesa/st: don't advertise NV_vdpau_interop if it doesn't work.Christian König2014-09-081-1/+7
| | | | | | | | | | | | As long as we don't have a workaround for frame based decoding in VDPAU we should not advertise NV_vdpau_interop. v2: fix commit message, check if get_video_param is present Signed-off-by: Christian König <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 12fb74fe895fe9954df127ca0ec6e4422fffb156)
* i965: Adjust fast-clear resolve rect for BDWKristian Høgsberg2014-09-081-4/+10
| | | | | | | | | | | | The scale factors for the resolve rectangle change for BDW and we have to look at brw->gen now to figure out how big it should be. Fixes: https://bugs.freedesktop.org/attachment.cgi?id=105777 Cc: "10.3" <[email protected]> Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 2d6d3461d307636b61d0f483677aaad11d1fd42a) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83046
* nvc0/ir: clarify recursion fix to finding first tex usesChristoph Bumiller2014-09-081-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a simple shader for reproducing the case mentioned: FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0] DCL TEMP[0..1], LOCAL IMM[0] FLT32 { 0.0000, -1.0000, 1.0000, 0.0000} 0: MOV TEMP[0].x, CONST[0].wwww 1: MOV TEMP[1].x, CONST[0].wwww 2: BGNLOOP 3: IF TEMP[0].xxxx 4: BRK 5: ENDIF 6: ADD TEMP[0].x, TEMP[0], IMM[0].zzzz 7: IF CONST[0].xxxx 8: TEX TEMP[1].x, CONST[0], SAMP[0], 2D 9: ENDIF 10: IF CONST[0].zzzz 11: MOV TEMP[1].x, CONST[0].zzzz 12: ENDIF 13: ENDLOOP 14: MOV OUT[0], TEMP[1].xxxx 15: END Cc: "10.2 10.3" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> (cherry picked from commit ca9ab05d45ebf407485af2daa3742b897ff99162)
* nv50/ir/util: fix BitSet issuesChristoph Bumiller2014-09-083-3/+10
| | | | | | | | | | | | | | BitSet::allocate() is being used with the expectation that it would leave the bitfield untouched if its size hasn't changed, however, the function always zeroed the last word, which led to obscure bugs with live set computation. This also fixes BitSet::resize(), which was broken, but luckily not being used. Cc: "10.2 10.3" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> (cherry picked from commit b9f9e3ce03dbd8d044a72a00e1e8856a500b5f72)
* i965/blorp: Pass image formats seperately from the miptreeJason Ekstrand2014-09-084-19/+43
| | | | | | | | | | | | | | | | When a texture is wrapped in a texture view, we can't trust the format in the miptree itself. This patch allows us to pass the format seperately through blorp so we can proprerly handled wrapped textures. It's worth noting here that we can use the miptree format directly for depth/stencil formats because they cannot be reinterpreted by a texture view. Signed-off-by: Jason Ekstrand <[email protected]> CC: "10.3" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> (cherry picked from commit 7599886b26853163ef354476be70aa7fd9ae35c5)
* st/mesa: use 1.0f as boolean true on drivers without integer supportMarek Olšák2014-09-051-2/+3
| | | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82882 Cc: 10.2 10.3 [email protected] Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit 1a00f247512f22e58548053a99a706615a178672)
* mesa: set UniformBooleanTrue = 1.0f by defaultMarek Olšák2014-09-052-0/+10
| | | | | | | | | | | because NativeIntegers is 0 by default. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82882 Cc: 10.2 10.3 [email protected] Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit d67db73458c8d66861b97675660289a9555695ce)
* freedreno/ir3: fix potential null ptr derefRob Clark2014-09-051-1/+2
| | | | | | | Fix potential segfault in debug code. Signed-off-by: Rob Clark <[email protected]> (cherry picked from commit c06afcede2a0cf214aadc7d4ea149b361ee56ad2)
* freedreno/a2xx: fix segfaultRob Clark2014-09-051-0/+1
| | | | | Signed-off-by: Rob Clark <[email protected]> (cherry picked from commit 306e421887720b149be77c749108bcffcebe34f6)
* freedreno/a3xx: handle first/last level properlyRob Clark2014-09-053-9/+13
| | | | | | | Fixes some assumptions about first_level being zero. Signed-off-by: Rob Clark <[email protected]> (cherry picked from commit bd3b0964675d36e753e273d5667b922cc9baac4a)
* freedreno: implement pipe_flush_resource()Rob Clark2014-09-051-1/+5
| | | | | Signed-off-by: Rob Clark <[email protected]> (cherry picked from commit b40a6c2b17de1f63d70d62608737ed9a259da1c5)
* freedreno: don't ignore src/dst levelRob Clark2014-09-051-39/+63
| | | | | | | Don't ignore src/dst_level in pipe_copy_region. Signed-off-by: Rob Clark <[email protected]> (cherry picked from commit 478a08ebd2b29724f2d440e560ab331c534236cd)
* automake: check if the linker supports --dynamic-listJonathan Gray2014-09-052-2/+10
| | | | | | | | | | | | | | | As older versions of gnu ld did not support --dynamic-list check to see if it is supported before using it. Non gnu linkers such the apple one likely lack this option as well. Fixes the build on OpenBSD which has binutils 2.15 and 2.17. The --dynamic-list option seems to been have introduced sometime after binutils 2.17 was released as it is present in 2.18. Cc: [email protected] Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 635477dc4b9579dac2fc0fb332dcf2e0e48dd418)
* 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]> (cherry picked from commit 8bcd57a46ce9d4a960253fd89ad21bd3e1776f8b)
* r600g,radeonsi: make sure there's enough CS space before resuming queriesMarek Olšák2014-09-051-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]> (cherry picked from commit 3dbf55c1be5a8867616e475d943c776d8245d0cc)
* mesa: invalidate draw state in glPopClientAttribMarek Olšák2014-09-051-0/+4
| | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82538 Cc: [email protected] Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 374f3e9e19f064007ea8a864fbd00f1ae7deafd1)
* winsys/svga: Fix incorrect type usage in IOCTL v2Thomas Hellstrom2014-09-051-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]> (cherry picked from commit 2d6206140afe9ecb551822ea00c36eeeef7edfbf)
* i965: Handle ir_triop_csel in emit_bool_to_cond_code().Kenneth Graunke2014-09-052-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] (cherry picked from commit 8270b048cf23ee8a8d5377a3af62fce7086e9c61)
* glsl: fix assertion which fails for unsigned array indices.tiffany2014-09-051-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]> (cherry picked from commit cfc42db592a7d9684d5cee8d4238a0b2dd6f0603)
* i965/copy_image: Divide the x offsets by block width when using the blitterJason Ekstrand2014-09-051-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]> (cherry picked from commit 11ee9a4d99fd68be4c09341225e7faeff70d1b9b)
* i965/copy_image: Use the correct block dimensionJason Ekstrand2014-09-051-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]> (cherry picked from commit 499acf6e4a758be74dc5813a8c174da4360e046d)
* meta/copy_image: Use the correct texture level when creating viewsJason Ekstrand2014-09-051-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]> (cherry picked from commit b608cd7fbf0c98c73fe5d0c87db51c0a244d420f)
* i965/copy_image: Use the correct texture levelJason Ekstrand2014-09-051-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]> (cherry picked from commit fcb6d5b9ef0d3559fa213c673ed996f194f56c2a)
* r600g: fix alpha-test with HyperZ enabled, fixing L4D2 tree corruptionMarek Olšák2014-09-051-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]> (cherry picked from commit 8abdc3c4a9c81e359d5dc1694253b05dd5562c95)
* meta: Make MESA_META_DRAW_BUFFERS restore properlyKristian Høgsberg2014-09-051-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] (cherry picked from commit 8f55174fbdc27076f310c4dfb1f87072588b8b0b)
* Revert "mesa: fix make tarballs"Emil Velikov2014-09-051-2/+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]> (cherry picked from commit 5a4e0f3873657d874eb5ff52819f42ea38d54b91)
* i965: add missing parens in vec4 visitorDave Airlie2014-09-051-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]> (cherry picked from commit 94a909ec2df779bfdac6f42a25077b427b3873ea)
* nv50: attach the buffer bo to the miptree structuresIlia Mirkin2014-09-051-8/+5
| | | | | | | | | | The current code... makes no sense. Use nouveau_bo_ref to attach the bo to the exposed resource so as to have the proper lifetime guarantees. Tested-by: Emil Velikov <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 2c440433130d3c64635684355a3667d145a188e3)
* nv50: mt address may not be the underlying bo's start addressIlia Mirkin2014-09-053-12/+14
| | | | | | | | | | | | | | | With VP2, nv50_miptree is faked because the underlying bo's have to be laid out in a certain way. This is done by adjusting the address. Make sure that blits (and everything else for consistency) use the mt address rather than the bo address as a base. This fixes retrieving chroma plane with VDPAU. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82255 Tested-by: Emil Velikov <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 9d52e551a5874e54bc80f306bf3cacbad2441315)
* nv50: set the miptree address when clearing bo's in vp2 initIlia Mirkin2014-09-051-0/+2
| | | | | | | | | | | The mt address is about to be used more, make sure it's set appropriately. Reported-by: Emil Velikov <[email protected]> Tested-by: Emil Velikov <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 2528d402b9e35601d4631cd80a301bacd87dfc95)
* nv50/ir: avoid creating instructions that can't be emittedIlia Mirkin2014-09-051-0/+4
| | | | | | | | | | | | When constant folding a MAD operation, we first fold the multiply and generate an ADD. However we do so without making sure that the immediate can be handled in the saturate case. If it can't, load the immediate in a separate instruction. Reported-by: Tiziano Bacocco <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 6c2b079231f84b09b3f35183930afe522baee168)
* nvc0: don't make 1d staging textures linearIlia Mirkin2014-09-051-1/+0
| | | | | | | | | | | | Experimentally, the sampler doesn't appear to like these, neither as buffer nor as rect textures. So remove 1D from the list of texture types to make linear when used for staging. This fixes the OSD in mplayer for VDPAU. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 115d9a5525e74573ced9209063a1d4a551e6eaa4)
* nv50: zero out unbound samplersIlia Mirkin2014-09-051-2/+5
| | | | | | | | | | Samplers are only defined up to num_samplers, so set all samplers above nr to NULL so that we don't try to read them again later. Tested-by: Christian Ruppert <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 362cd26960aff2e997584064443dcc0418516ae6)
* nvc0/ir: avoid infinite recursion when finding first uses of texIlia Mirkin2014-09-052-8/+29
| | | | | | | | | | | | In certain circumstances, findFirstUses could end up doubling back on instructions it had already processed, resulting in an infinite recursion. Avoid this by keeping track of already-visited instructions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83079 Tested-by: Tobias Klausmann <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit c4bb436f7660c951cd27e52660cf825da68793e5)
* r600g: fix layered clearMarek Olšák2014-09-051-1/+2
| | | | | | Cc: [email protected] Acked-by: Michel Dänzer <[email protected]> (cherry picked from commit d159c5e3e0bdfe3c19a2da7526133fdd94ffee79)
* glsl_to_tgsi: allocate and enlarge arrays for temporaries on demandMarek Olšák2014-09-051-18/+33
| | | | | | | | | | | | This fixes crashes if the number of temporaries is greater than 4096. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66184 v2: added fail paths for realloc failures Cc: 10.2 10.3 [email protected] Reviewed-by: Ilia Mirkin <[email protected]> (cherry picked from commit 482def592fede9c4c2f1e6944df42e8319dd6b78)
* mesa: fix make tarballsEmil Velikov2014-09-011-1/+2
| | | | | | | | | | | | | | Current method of generating distribution tar-balls involves manually invoking make + target name in the appropriate places. This temporary solution is used until we get 'make dist' working. Currently it does not work, as in order to have the target (which is also a filename) available in the final Makefile we need to add a PHONY target + use the correct target name. Cc: "10.2 10.3" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 88cbe3908f0ea08228a5ffb1808f98b6906c4416)