summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* svga: remove some unneeded INLINE qualifiersBrian Paul2014-08-143-5/+5
| | | | Trivial.
* st/vdpau: add device reference countingChristian König2014-08-148-11/+46
| | | | | | | | | | This fixes an issue with flash where it tries to destroy a decoder after already destroying the device associated with the decoder. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=82517 Signed-off-by: Christian König <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* hud: don't overrun malloced arraysDave Airlie2014-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ==17630== Invalid read of size 4 ==17630== at 0x400AE10: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==17630== by 0x49024A2: u_upload_data (u_upload_mgr.c:253) ==17630== by 0x49050E1: u_vbuf_draw_vbo (u_vbuf.c:980) ==17630== by 0x487DE29: cso_draw_vbo (cso_context.c:1425) ==17630== by 0x487DEA0: cso_draw_arrays (cso_context.c:1445) ==17630== by 0x48A3B0E: hud_draw_colored_prims.constprop.6 (hud_context.c:123) ==17630== by 0x48A4810: hud_draw (hud_context.c:266) ==17630== by 0x48763F7: dri_flush (dri_drawable.c:483) ==17630== by 0x4057510: dri2Flush.constprop.4 (dri2_glx.c:559) ==17630== by 0x405789E: dri2SwapBuffers (dri2_glx.c:851) ==17630== by 0x402C531: glXSwapBuffers (glxcmds.c:842) ==17630== by 0x8049716: ??? (in /usr/bin/glxgears) ==17630== Address 0x4426b2c is 4 bytes after a block of size 1,008 alloc'd ==17630== at 0x4006B11: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==17630== by 0x48A4CE7: hud_pane_add_graph (hud_context.c:625) ==17630== by 0x48A68F0: hud_pipe_query_install (hud_driver_query.c:175) ==17630== by 0x48A6A30: hud_driver_query_install (hud_driver_query.c:207) ==17630== by 0x48A5835: hud_create (hud_context.c:791) ==17630== by 0x48756CB: dri_create_context (dri_context.c:165) ==17630== by 0x4871CD4: driCreateContextAttribs (dri_util.c:435) ==17630== by 0x4871E06: driCreateNewContext (dri_util.c:464) ==17630== by 0x4056A22: dri2_create_context (dri2_glx.c:223) ==17630== by 0x402CF68: CreateContext (glxcmds.c:299) ==17630== by 0x402D265: glXCreateContext (glxcmds.c:430) ==17630== by 0x804B136: ??? (in /usr/bin/glxgears) This is due to second vertex element being specified, and the upload tries to fetch over the end. However the pane rendering only requires a single vertex element, so specify only one. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* winsys/radeon: fix hawaii accel_working2 commentAndreas Boll2014-08-131-1/+1
| | | | | | | | | | accel_working2 returns 3 if the new firmware is used. The comment wasn't updated in v3 of commit: 36771dc winsys/radeon: fix nop packet padding for hawaii Signed-off-by: Andreas Boll <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r300g: Fix bug in build_loop_info()/compiler v2Tom Stellard2014-08-131-11/+23
| | | | | | | | | | | Fixes piglit glean "do-loop with continue and break" on RS690 It's based on Tom Stellard patch and improved to handle CMP instruction. [v2] handle CMP instruction Reviewed-by: Tom Stellard <[email protected]> Signed-off-by: David Heidelberger <[email protected]>
* clover: Flush the command queue in clReleaseCommandQueue()Tom Stellard2014-08-131-1/+5
| | | | | | | | This is required by the spec. Reviewed-by: Francisco Jerez <[email protected]> CC: "10.2" <[email protected]>
* radeonsi/compute: Stop leaking the input bufferTom Stellard2014-08-131-7/+14
| | | | | | | | We were leaking the input buffer used for kernel arguments and since we were allocating it using si_upload_const_buffer() we were leaking 1 MB per kernel invocation. CC: "10.2" <[email protected]>
* radeonsi/compute: Whitespace fixesTom Stellard2014-08-131-2/+1
| | | | CC: "10.2" <[email protected]>
* radeonsi/compute: Call si_pm4_free_state() after emitting compute stateTom Stellard2014-08-131-1/+1
| | | | | | | This will decrement the reference count for buffers referenced in the command stream will prevent us from leaking them. CC: "10.2" <[email protected]>
* radeonsi/compute: Update reference counts for buffers in si_set_global_binding()Tom Stellard2014-08-131-2/+2
| | | | CC: "10.2" <[email protected]>
* radeon/compute: Report a value for PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZETom Stellard2014-08-132-1/+17
| | | | CC: "10.2" <[email protected]>
* radeon/compute: Fix reported values for MAX_GLOBAL_SIZE and MAX_MEM_ALLOC_SIZETom Stellard2014-08-131-13/+19
| | | | | | | | There is a hard limit in older kernels of 256 MB for buffer allocations, so report this value as MAX_MEM_ALLOC_SIZE and adjust MAX_GLOBAL_SIZE to statisfy requirements of OpenCL. CC: "10.2" <[email protected]>
* ra: cleanup the public APIConnor Abbott2014-08-131-1/+1
| | | | | | | | | | | | | | Previously, there were 3 entrypoints into parts of the actual allocator, and an API called ra_allocate_no_spills() that called all 3. Nobody would ever want to call any of the 3 entrypoints by themselves, so everybody just used ra_allocate_no_spills(). So just make them static functions, and while we're at it rename ra_allocate_no_spills() to ra_allocate() since there's no equivalent "with spills," because the backend is supposed to handle spilling. Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nvc0: increase GLSL level to 400 to enable ARB_gpu_shader5Ilia Mirkin2014-08-131-1/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* android: gallium: use the installed libdrm headersEmil Velikov2014-08-133-10/+3
| | | | | | Saves us a few lines and brings us closer to the automake build. Signed-off-by: Emil Velikov <[email protected]>
* android: drop HAL_PIXEL_FORMAT_RGBA_{5551,4444}Emil Velikov2014-08-131-4/+0
| | | | | | | | | | | | | | | | | | | Upstream Android (system/core) has dropped these formats with commit 6bac41f1bf9(get rid of HAL pixelformats 5551 and 4444) yet does not mention why. These formats never really worked so we're safe to drop them as well. Identical commit is available in the android-x86 external/mesa repo commit 06a2d36edcd1e2247440e5800e6bf3028f37aee6 Author: Chih-Wei Huang <[email protected]> Date: Wed Sep 25 01:16:57 2013 +0800 android: get rid of HAL pixelformats 5551 and 4444 Cc: "10.1 10.2" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* android: gallium/auxiliary: drop log2/log2f redefitionsEmil Velikov2014-08-131-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent versions of bionic has picked up support for these functions, leading to build issues due to the redefition of the symbols. Note: wrapping things in #ifdef does not cut it :\ Identical patch is available in chromium, android-x86 and perhaps other projects. commit 66c1c789ce3407472de9ed620c9f815639058835 Author: [email protected] Date: Wed Apr 02 10:59:34 2014 +0000 Porting to x64 Android. Remove redefinitions of log2 and log2f. BUG= [email protected] Review URL: https://codereview.chromium.org/216773005 commit 9cc0a0d2b0499556680b182888af86f29d4ec30b Author: Chih-Wei Huang <[email protected]> Date: Sun Jul 21 23:04:19 2013 +0800 android: remove log2, log2f The functions are already defined in the latest bionic. Cc: Chia-I Wu <[email protected]> Cc: "10.1 10.2" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Chia-I Wu <[email protected]>
* android: targets/egl-static: add correct include for DRM headersEmil Velikov2014-08-131-3/+1
| | | | | | | | | | Android build never really installs the headers, as such we need to explicitly add their location in the source tree otherwise it will fail to find them. v2: Android now installs the headers, so let's use that ;) Signed-off-by: Emil Velikov <[email protected]>
* scons: group state-trackers' and targets' sconsEmil Velikov2014-08-131-31/+11
| | | | | | | Both share the identical dependencies, as such we can simplify the scons script. Signed-off-by: Emil Velikov <[email protected]>
* android: reorder gallium SUBDIRSEmil Velikov2014-08-131-4/+10
| | | | | | To be closer to its automake counterpart. Signed-off-by: Emil Velikov <[email protected]>
* automake: handle gallium SUBDIRs in gallium/MakefileEmil Velikov2014-08-131-0/+16
| | | | | | | | Considering the way we've been consolidating things it makes sense to add the final two (aux and tests) in here. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* automake: compact gallium/target/Makefile into gallium/MakefileEmil Velikov2014-08-132-86/+20
| | | | | | | | | | Yet another makefile less to worry about. v2: Add state_trackers and targets on a single SUBDIRS line. Requested by Matt. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* automake: merge gallium/state_trackers/Makefile into gallium/MakefileEmil Velikov2014-08-132-66/+49
| | | | | | | | | | One makefile less, with the potential of further compacting the automake build. v2: Rebase on top of vc4 changes. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* automake: compact gallium/drivers and gallium/winsys makefilesEmil Velikov2014-08-133-177/+104
| | | | | | | | | | | | Rather than having two separate almost empty and identical makefiles, compact them thus improving the configure and build time. Additionally this makes the automake build symmetrical to the scons and android one. v2: Rebase on top of vc4, compact drivers + winsys on a single line. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* android: egl/main: add/enable freedrenoEmil Velikov2014-08-131-0/+3
| | | | | | | | | | For all everyone willing to give the freedreno driver a go they can now build it under Android. Cc: "10.1 10.2" <[email protected]> Cc: Rob Clark <[email protected]> Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* android: gallium/freedreno: add preliminary buildEmil Velikov2014-08-133-0/+86
| | | | | | | | | | | | | | | | | | For all the people interested in testing the freedreno driver on their Android devices. The next commit will hook these up within the libEGL driver (via the gallium-egl backend). There may be some rough edges but those can be sorted when a willing builder/tester comes along. v2: - s/freefreno/freedreno/. Spotted by Matt Turner. - Use the installed libdrm headers. Cc: "10.1 10.2" <[email protected]> Cc: Rob Clark <[email protected]> Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* automake: gallium/freedreno: drop spurious include dirsEmil Velikov2014-08-132-4/+2
| | | | | | | | | | | Rather than including two extra folders only for two headers, just prefix the headers and be done with it. Cc: "10.1 10.2" <[email protected]> Cc: Rob Clark <[email protected]> Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* android: gallium/radeon: attempt to fix the android buildPaulo Sergio Travaglia2014-08-136-7/+45
| | | | | | | | | | | - include the correct folders - add a new buildscript for the common radeon folder v2: Use the installed libdrm headers over the DRM_TOP ones. Cc: "10.1 10.2" <[email protected]> [Emil Velikov] Split up and add commit message. Signed-off-by: Emil Velikov <[email protected]>
* android: gallium/nouveau: fix include folders, link against libstlportEmil Velikov2014-08-132-8/+6
| | | | | | | | | | | nouveau uses STL for a while now thus we need to include external/stlport/libstlport.mk in order to get the build at least partially working. v2: Use the installed libdrm headers over the DRM_TOP ones. Cc: "10.1 10.2" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* nvc0: add BPTC format supportIlia Mirkin2014-08-121-0/+7
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* softpipe,llvmpipe: mark BPTC formats as unsupportedIlia Mirkin2014-08-122-0/+10
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: add basic support for BPTC formatsIlia Mirkin2014-08-129-3/+165
| | | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* st/dri: define GALLIUM_SOFTPIPE when building kms_swrastEmil Velikov2014-08-123-3/+9
| | | | | | | | | | | | | | | To avoid unresolved symbols in the DRI modules with earlier commit we wrapped the innards of dri_kms_init_screen() in a DRI_TARGET/GALLIUM_SOFTPIPE ifdef. At the same time we forgot to adds the defines to the st/dri build systems, breaking kms_swrast and gnome-continuous. Drop the DRI_TARGET define, we're already in st/DRI. Reported-by: Jasper St. Pierre <[email protected]> Reported-by: Vadim Rutkovsky <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* vc4: Drop the dump_fbo() routine.Eric Anholt2014-08-121-50/+0
| | | | | Now that eglkms is working, and some tests are working under PIGLIT_PLATFORM=gbm, I don't think I need this any more.
* vc4: Claim the GL 2.1 minimum for 3D textures.Eric Anholt2014-08-121-1/+2
| | | | | | | We don't actually do them (or even fake them) currently, but it does get us a bunch of unrelated glean glsl1 tests passing, which previously would error out due to glean assuming the minimums on a 3D texture that 2 of the subtests use.
* vc4: Declare what vertex formats we actually support.Eric Anholt2014-08-121-2/+7
| | | | | We will support more than this eventually, but for now this makes u_vbuf format-convert a few things (32-bit snorm and scaled, doubles) for us.
* vc4: Stash some debug code for format support checks.Eric Anholt2014-08-121-0/+9
| | | | | | This can be useful for looking at context init setup and texture format choices, and there's no reason for the silly retval computation we do if you're not going to have this code (mostly from freedreno) around.
* vc4: Texture format support has nothing to do with VBO format support.Eric Anholt2014-08-121-2/+1
| | | | This was inherited from freedreno, but doesn't apply to us.
* vc4: Fix off-by-one in texture maximum levels.Eric Anholt2014-08-121-1/+1
| | | | It's 2048x2048 that's the max, not 1024x1024.
* vc4: Add support for the FLR opcode.Eric Anholt2014-08-121-0/+18
|
* gallium/r300: Fix a link error in the testsJason Ekstrand2014-08-121-1/+1
| | | | | | | | | The link error occurs because the static libraries are linked in the wrong order. This fixes it. Signed-off-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82483 Reviewed-by: Tom Stellard <[email protected]>
* winsys/radeon: fix nop packet padding for hawaiiAndreas Boll2014-08-123-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial firmware for hawaii does not support type3 nop packet. Detect the new hawaii firmware with query RADEON_INFO_ACCEL_WORKING2. If the returned value is 3, then the new firmware is used. This patch uses type2 for the old firmware and type3 for the new firmware. It fixes the cases when the old firmware is used and the user wants to manually enable acceleration. The two possible scenarios are: - the kernel has no support for the new firmware. - the kernel has support for the new firmware but only the old firmware is available. Additionaly this patch disables GPU acceleration on hawaii if the kernel returns a value < 2. In this case the kernel hasn't the required fixes for proper acceleration. v2: - Fix indentation - Use private struct radeon_drm_winsys instead of public struct radeon_info - Rename r600_accel_working2 to accel_working2 v3: - Use type2 nop packet for returned value < 3 v4: - Fail to initialize winsys for returned value < 2 Cc: [email protected] Cc: Alex Deucher <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Marek Olšák <[email protected]> Cc: Michel Dänzer <[email protected]> Signed-off-by: Andreas Boll <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* svga: Add a limit to the maximum surface sizeCharmaine Lee2014-08-129-7/+130
| | | | | | | | | This patch adds a limit to the maximum surface size which is based on the maximum size of a single mob. If this value is not available, the maximum surface size is by default set to 128 MB. Reviewed-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/st: add support for dynamic sampler offsetsIlia Mirkin2014-08-121-1/+1
| | | | | | | | | | | | | | Replace the plain sampler index with a register reference to a sampler. We also need to keep track of the sampler array size when there is a relative reference so that we can mark the whole array used. To facilitate implementation, we add a separate ADDR register that exclusively handles the sampler relative address. Other approaches would be more invasive. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* radeon/uvd: fix gpu_address for video surfacesChristian König2014-08-122-0/+4
| | | | | | | | | | | We need to get the new gpu_address as well when reallocating the cs buffer. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82428 Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Kai Wasserbäch <[email protected]>
* nvc0/ir: describe the tex arguments for fermi/keplerIlia Mirkin2014-08-111-0/+25
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: add kepler+ support for indirect texture referencesIlia Mirkin2014-08-111-7/+27
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: add base tex offset for fermi indirect tex caseIlia Mirkin2014-08-111-2/+10
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* vc4: Flip which primitives are considered front-facing.Eric Anholt2014-08-111-1/+1
| | | | This mostly fixes glxgears rendering.
* vc4: Don't forget to set the depth clear value in the packet.Eric Anholt2014-08-111-1/+1
| | | | This gets glxgears partially rendering again.