summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Fix GPU hangs with >16 varying values.Eric Anholt2016-08-242-19/+68
| | | | Fixes glsl-routing in piglit and hangs in glbenchmark 2.0.2.
* vl/rbsp: fix another three byte not detectedLeo Liu2016-08-241-1/+1
| | | | | | | | | | | | This happens when three byte "00 00 03" is partly loaded to vlc->buffer, thus at the bottom of buffer with valid bits is "00" or "00 00" and left like "00 03" or "03" in the data, so that it will not be detected by three byte emulation check. The reason for that is the escaped bit was set to 0 from the rbsp init. Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: fix VM faults due NULL internal const buffers on CIKMarek Olšák2016-08-241-2/+11
| | | | | | | | They are harmless, but the interrupts do decrease performance. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97039 Cc: 12.0 <[email protected]>
* gallium/winsys/kms: Look up the GEM handle after importing a prime FDTomasz Figa2016-08-241-0/+4
| | | | | | | | | | | | | | | | | | | | drmPrimeHandleToFD() will return the same GEM handle every time the same buffer is imported, even from a different prime FD. Since GEM handles are not reference counted, we need to make sure that each GEM handle is referenced only by one display target struct, by looking it up in kms_sw->bo_list first and bumping the refcount of the found dt on hit and falling back to creating a new dt only on miss. v2: Split into separate function. Use helper function for lookup. v3 [Emil Velikov]: Rename kms_sw_displaytarget_{lookup,find_and_ref} (Jordan) Signed-off-by: Tomasz Figa <[email protected]> CC: <[email protected]> Reviewed-by: Hans de Goede <[email protected]> (v2) Signed-off-by: Emil Velikov <[email protected]>
* gallium/winsys/kms: Move display target handle lookup to separate functionTomasz Figa2016-08-241-9/+24
| | | | | | | | | | | | | | | | | As a preparation to use the lookup in more than once place, move the code that looks up given KMS/GEM handle to a separate function. This change should not introduce any functional changes. v2: Split into separate patch. Move lookup code into separate function. v3 [Emil Velikov]: Rename kms_sw_displaytarget_{lookup,find_and_ref} (Jordan) Signed-off-by: Tomasz Figa <[email protected]> CC: <[email protected]> Reviewed-by: Hans de Goede <[email protected]> (v2) Signed-off-by: Emil Velikov <[email protected]>
* gallium/winsys/kms: Fully initialize kms_sw_dt at prime import time (v2)Tomasz Figa2016-08-241-7/+11
| | | | | | | | | | | | | | | Currently kms_sw_displaytarget_add_from_prime() allocates the struct and fills in only some of the fields, resulting in a half-baked struct that needs to be further completed by the caller. To make this a bit more consistent, pass width, height and stride to this function and fill in everything there, so that caller can take the returned struct as is. v2: Split from one big patch into four fixing one thing at a time. Signed-off-by: Tomasz Figa <[email protected]> CC: <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/winsys/kms: Fix double refcount when importing from prime FD (v2)Tomasz Figa2016-08-241-1/+0
| | | | | | | | | | | | | Currently the code creates a display target struct with refcount field initialized to 1 and then the caller again increments it, leading to a leaked reference. Let's remove the unnecessary increment. v2: Split from one big patch into four fixing one thing at a time. Signed-off-by: Tomasz Figa <[email protected]> CC: <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* shaderapi: don't generate not linked error on GetProgramStage in generalAlejandro Piñeiro2016-08-241-1/+18
| | | | | | | | | | Both ARB_shader_subroutine and the GL core spec doesn't list any error when the program is not linked. We left a error generation for the uniform location, in order to be consistent with other methods from the spec that generate them. Reviewed-by: Tapani Pälli <[email protected]>
* gallium/cso: avoid unnecessary null dereferenceEric Engestrom2016-08-241-1/+1
| | | | | | | | | | | The label `out:` calls `destroy()` which dereferences `ctx`. This is unnecessary as there is nothing to destroy. Immediately return instead. CovID: 1258255 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/xvmc: fix a couple 'unused-but-set-variable' warningsEric Engestrom2016-08-241-2/+3
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: turn a couple asserts static (compile-time)Eric Engestrom2016-08-241-3/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i915: remove unnecessary `if`Eric Engestrom2016-08-241-3/+1
| | | | | | | | | | | if (x) return true; else return false; can be simplified as: return x; since `x` is already a boolean expression. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965: remove unnecessary `if`Eric Engestrom2016-08-241-6/+2
| | | | | | | | | | | if (x) return true; else return false; can be simplified as: return x; since both `x` are already boolean expressions. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* program_resource: subroutine active uniforms should return NumSubroutineUniformsAlejandro Piñeiro2016-08-241-23/+118
| | | | | | | | | | | | | | | | | | | | | | Before this commit, GetProgramInterfaceiv for pname ACTIVE_RESOURCES and all the <shader>_SUBROUTINE_UNIFORM programInterface were returning the count of resources on the shader program using that interface, instead of the num of uniform resources. This would get a wrong value (for example) if the shader has an array of subroutine uniforms. Note that this means that in order to get a proper value, the shader needs to be linked, something that is not explicitly mentioned on ARB_program_interface_query spec, but comes from the general definition of active uniform. If the program is not linked we return 0. v2: don't generate an error if the program is not linked, returning 0 active uniforms instead, plus extra spec references (Tapani Palli) Fixes GL44-CTS.program_interface_query.subroutines-compute Reviewed-by: Tapani Pälli <[email protected]>
* egl/wayland-egl: Fix for segfault in dri2_wl_destroy_surface.Stencel, Joanna2016-08-242-0/+4
| | | | | | | | | | | Segfault occurs when destroying EGL surface attached to already destroyed Wayland window. The fix is to set to NULL the pointer of surface's native window when wl_egl_destroy_window() is called. Cc: [email protected] Signed-off-by: Stencel, Joanna <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/va: Remove unused variable coded_size from vlVaEndPicture()Kai Wasserbäch2016-08-241-1/+0
| | | | | | | | | | | | Removes the following GCC warning: ../../../../../src/gallium/state_trackers/va/picture.c:542:17: warning: unused variable 'coded_size' [-Wunused-variable] unsigned int coded_size; ^~~~~~~~~~ Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Boyuan Zhang <[email protected]>
* st/va: Remove else case in vlVaEndPicture() made superfluous by c59628d11bKai Wasserbäch2016-08-241-3/+1
| | | | | | | | | | Commit c59628d11b134fc016388a170880f7646e100d6f made the else statement and duplication of the context->decoder->end_frame() call superfluous. Cc: Boyuan Zhang <[email protected]> Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Boyuan Zhang <[email protected]>
* st/va: add missing mutex_unlockEric Engestrom2016-08-241-1/+3
| | | | | | | | Fixes: c59628d11b134fc01638 ("st/va: enable dual instances encode by sync surface") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Boyuan Zhang <[email protected]> Reviewed-by: Christian König <[email protected]>
* aubinator: Style fixes.Kenneth Graunke2016-08-234-34/+45
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* aubinator: Fix the tool to correctly decode the DWordsSirisha Gandikota2016-08-233-53/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fixes have been added as part of this as listed below: 1) Fix the mask and add disassembler handling for STATE_DS, STATE_HS as the mask returned wrong values of the fields. 2) Fix the GEN_TYPE_ADDRESS/GEN_TYPE_OFFSET decoding - the address/ offset were handled the same way as the other fields and that gives the wrong values for the address/offset. 3) Decode nested/recurssive structures - Many packets contain nested structures, ex: 3DSATE_SO_BUFFER, STATE_BASE_ADDRESS, etc contain MOC structures. Previously, the aubinator printed 1 if there was a MOC structure. Now we decode the entire structure and print out its fields. 4) Print out the DWord address along with its hex value - For a better clarity of information, it is helpful to print both the address and hex value of the DWord along with the DWord count. Since the DWord0 contains the instruction code and the instruction length, it is unnecessary to print the decoded values for DWord0. This information is already available from the DWord hex value. 5) Decode the <group> and the corresponding fields in the group- The <group> tag can have fields of several types including structures. A group can contain one or more number of fields and this has be correctly decoded. Previously, aubinator did not decode the groups or the fields/structures inside them. Now we decode the <group> in the instructions and structures where the fields in it repeat for any number of times specified. v2: Fix the formatting (per Matt) Make the start and end pos calculation to extract fields from a DWord more appropriate by moving %32 away from mask() method Signed-off-by: Sirisha Gandikota <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Acked-by: Ben Widawsky <[email protected]>
* aubinator: Add a new tool called Aubinator to the src/intel/tools folder.Kristian Høgsberg Kristensen2016-08-237-0/+1855
| | | | | | | | | | | | | | | | | The Aubinator tool is designed to help the driver developers in debugging the driver functionality by decoding the data in the .aub files. Primary Authors of this tool are Damien Lespiau <damien.lespiau at intel.com> and Kristian Høgsberg Kristensen <krh at bitplanet.net>. v2: Review comments are incorporated by Sirisha Gandikota as below: 1) Make Makefile.am more crisp, reuse intel_aub.h from libdrm (per Emil) 2) Aubinator will use platform name instead of GEN number (per Matt) 3) Disassmebler gets created based on pciid rather then GEN number (per Matt) 4) Other formatting comments (per Ken, Matt and Emil) Signed-off-by: Sirisha Gandikota <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Acked-by: Ben Widawsky <[email protected]>
* glsl: Mark tessellation qualifier maps static const.Kenneth Graunke2016-08-231-2/+2
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* isl/formats: Integer formats are not filterableJason Ekstrand2016-08-231-8/+8
| | | | | | | | | In ca2a8e56285, we updated the format table to add more formats (most of which are new on SKL) but accidentally marked some integer formats as filterable. You can't filter an integer format. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* st/dri: respect driver's request to avoid mixed color/depth bit configsIlia Mirkin2016-08-231-2/+6
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add a cap to expose whether driver supports mixed color/zs bitsIlia Mirkin2016-08-2317-0/+22
| | | | | | | | | | Some hardware can't render to color/depth buffers of mixed bitness. When that happens a fallback has to happen, but this allows the driver to express that this isn't an optimal scenario. The purpose of this is to remove such fbconfigs from the GLX/EGL config list. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dri: add a way to request that modes have matching color/zs depthsIlia Mirkin2016-08-238-14/+29
| | | | | | | | | | Some GPUs, notably nv3x/nv4x can't render to mismatched color/zs framebuffer depths. Fallbacks can be done by the driver, with shadow surfaces, but no reason to encourage applications to select non-matching glx visuals. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* nv50/ir: make sure cfg iterator always hits all blocksIlia Mirkin2016-08-231-4/+4
| | | | | | | | | | | | In some very specially-crafted cases, we could attempt to visit a node that has already been visited, and then run out of bb's to visit, while there were still cross blocks on the list. Make sure that those get moved over in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96274 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Cc: [email protected]
* anv/clear: Clear E5B9G9R9 images as R32_UINTJason Ekstrand2016-08-231-2/+14
| | | | | | | | | | | | | We can't actually clear these images normally because we can't render to them. Instead, we have to manually unpack the rgb9e5 color value on the CPU and clear it as R32_UINT. We still have a bit of work to do to clear non-power-of-two images, but this should get all of the power-of-two clears working on at least Haswell. This fixes three of the new Vulkan CTS tests in the dEQP-VK.api.image_clearing.clear_color_image.* group. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0" <[email protected]>
* anv/clear: Make cmd_clear_image take an actual VkClearValueJason Ekstrand2016-08-231-5/+5
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0" <[email protected]>
* anv/blit2d: Add support for RGB destinationsJason Ekstrand2016-08-231-2/+214
| | | | | | | | This fixes 104 of the new image_clearing and copy_and_blit Vulkan CTS tests. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/blit2d: Add a format parameter to bind_dst and create_iviewJason Ekstrand2016-08-231-5/+10
| | | | | | Signed-off-by: Jasosn Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0" <[email protected]>
* anv/image: Don't create invalid render target surfacesJason Ekstrand2016-08-231-1/+12
| | | | Signed-off-by: Jason Ekstrand <[email protected]>
* isl/formats: Update the table with more samplable formatsJason Ekstrand2016-08-231-15/+15
| | | | | | | | There were a lot of formats where support was added on Haswell or later but we never updated the format table. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* isl/formats: Report ETC as being samplable on Bay TrailJason Ekstrand2016-08-231-0/+18
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* i965/surface_formats: Don't advertise 8 or 16-bit RGB formatsJason Ekstrand2016-08-231-0/+10
| | | | | | | | | | | | | We have implicitly been not advertising these formats since we had them turned off in the format capabilities table. We are about to update that table and this prevents a change in behavior. The only change in behavior created by this patch is that we no longer advertise support for R16G16B16_FLOAT which means that it's now renderable which seems like a bonus. Maybe someday we'll want to change things to start supporting 16-bit RGB formats natively but, at the moment, there's no need. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/formats: Don't use an RGBX format if it isn't renderableJason Ekstrand2016-08-231-1/+2
| | | | | | | | | | The whole point of using RGBX is so that we can render to it so if it isn't renderable, that kind-of defeats the purpose. Some formats (one example is R32G32B32X32_SFLOAT) exist in the format table but aren't actually renderable. Eventually, we'd like to get away from RGBX entirely, but this fixes hangs on BDW today. Signed-off-by: Jason Ekstrand <[email protected]>
* egl/dri2: dri2_initialize: Do not reference-count TestOnly displayNicolas Boichat2016-08-231-20/+9
| | | | | | | | | | | | | | | In the case where dri2_initialize is called with a TestOnly display, the display is not actually initialized, so dri2_egl_display always fails, and we cannot do any reference counting. Fixes piglit spec@egl_khr_create_context@verify gl flavor (reproducible with LIBGL_ALWAYS_SOFTWARE=1). Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Reported-by: Michel Dänzer <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: fix format string compiler warning for 32-bit machinesJan Ziak2016-08-231-5/+6
| | | | | Signed-off-by: Jan Ziak (http://atom-symbol.net) <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/dri2: remove error checks on return values from mtx_lock and cnd_waitDongwon Kim2016-08-231-35/+12
| | | | | | | | | | | | | This removes unnecessary error checks on return result of mtx_lock and cnd_wait calls as in all other places in MESA source since there is no chance that any of these functions return any of error codes in current implementation. This patch also removes a redundent _eglError call that follows EGL_FALSE check in the bottom of dri2_client_wait_sync. Signed-off-by: Dongwon Kim <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965: report bound buffer size not underlying buffer size for image size (v2)Dave Airlie2016-08-231-2/+2
| | | | | | | | | | | | | | This seems to make sense, the image is bound to a subset of the buffer so the image size should be from the bound size not the underlying object. This fixes: GL44-CTS.shader_image_size.advanced-nonMS-fs-int v2: get mininum of the two values, same as we write to the hw. Reviewed-by: Francisco Jerez <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* anv: Throw INCOMPATIBLE_DRIVER for non-fatal initialization errorsJason Ekstrand2016-08-221-5/+3
| | | | | | | | | | | The only reason we should throw INITIALIZATION_FAILED is if we have found useable intel hardware but have failed to bring it up for some reason. Otherwise, we should just throw INCOMPATIBLE_DRIVER which will turn into successfully advertising 0 physical devices Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
* st/glsl_to_tgsi: fix st_src_reg_for_double constant.Dave Airlie2016-08-231-1/+1
| | | | | | | | | | | | This needs to set the src swizzle so it doesn't access the .zw members ever when we are just emitting a 0 constant here. This fixes: vert-conversion-explicit-dvec3-bvec3.shader_test and a bunch of other fp64 tests on softpipe and radeonsi. Cc: <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/subroutines: drop the old subroutine index uploads.Dave Airlie2016-08-231-6/+0
| | | | | | | | | We used to upload the indices when they changed, now we rely on the drivers calling the correct hook to have the values updated from the context storage. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* st/mesa: use the new subroutine index upload API.Dave Airlie2016-08-234-12/+18
| | | | | | | This plugs the new API into the gallium state tracker. Signed-off-by: Dave Airlie <[email protected]> Acked-by: Andres Gomez <[email protected]>
* i965: use new subroutine index uploader.Dave Airlie2016-08-2311-0/+25
| | | | | | | | This plugs the subroutine index updates into the i965 backend, where it loads constants. Signed-off-by: Dave Airlie <[email protected]> Acked-by: Andres Gomez <[email protected]>
* mesa: add api to write subroutine indicies to the program storage.Dave Airlie2016-08-232-0/+13
| | | | | | | | | | | | This writes the subroutine indicies to the program storage for a stage. This API is intended to be used by drivers to update the uniform storage before uploading to the hw. This isn't the most thread safe effort, but it will be significantly more multi-context safe. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* mesa/subroutines: start adding per-context subroutine index support (v1.1)Dave Airlie2016-08-234-32/+61
| | | | | | | | | | | | | | | | | | | | | | | One piece of ARB_shader_subroutine I ignored was the fact that it needs to store the subroutine index data per context and not per shader program. There is one CTS test that tests this: GL45-CTS.shader_subroutine.multiple_contexts However the test only does a write to context and readback, it never renders using the values, so this is enough to fix the test however not enough to do what the spec says. So with this patch the info is now stored per context, but it gets updated into the program at UseProgram and when the values are inserted into the context, which won't help if multiple contexts are in use in multiple threads. v1.1: cleanups and nit-picks (Andres) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* vbo: Make #if 0'd debugging code compile.Matt Turner2016-08-221-1/+1
|
* nir: avoid segfault when ssa src not foundTimothy Arceri2016-08-231-0/+3
| | | | | | | Without this the following line will segfault and we don't get to see the results of the validate_assert() above. Reviewed-by: Jason Ekstrand <[email protected]>
* vc4: Tell state_tracker that we would prefer NIR.Eric Anholt2016-08-223-8/+31
| | | | | | | | | | Before this series, the code generation path was: GLSL IR -> TGSI -> NIR -> NIR clone -> QIR -> QPU Now it's (generally) GLSL IR -> NIR -> NIR clone -> QIR -> QPU