summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* st/wgl: Clamp wglChoosePixelFormatARB's output nNumFormats to nMaxFormats.José Fonseca2014-07-291-2/+4
| | | | | | | | | | | | | | While running https://github.com/nvMcJohn/apitest with apitrace I noticed that Mesa was producing bogus results: wglChoosePixelFormatARB(hdc, piAttribIList = {...}, pfAttribFList = &0, nMaxFormats = 1, piFormats = {19, 65576, 37, 198656, 131075, 0, 402653184, 0, 0, 0, 0, -573575710}, nNumFormats = &12) = TRUE However https://www.opengl.org/registry/specs/ARB/wgl_pixel_format.txt states <nNumFormats> returns the number of matching formats. The returned value is guaranteed to be no larger than <nMaxFormats>. Cc: "10.2" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: rename shader cap MAX_CONSTS to MAX_CONST_BUFFER_SIZEMarek Olšák2014-07-281-1/+1
| | | | | | | | | | This new name isn't so confusing. I also changed the gallivm limit, because it looked wrong. Reviewed-by: Brian Paul <[email protected]> v2: use sizeof(float[4])
* clover: Add checks for image support to the image functions v2Tom Stellard2014-07-283-0/+12
| | | | | | | | | | Most image functions are required to return a CL_INVALID_OPERATION error when used on devices without image support. v2: - Simplified the code Reviewed-by: Francisco Jerez <[email protected]>
* clover: Add clUnloadPlatformCompiler.EdB2014-07-282-1/+6
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Add clCreateProgramWithBuiltInKernels.EdB2014-07-282-1/+23
| | | | | | | [ Francisco Jerez: Check for devices not associated with the specified context. Style fix. ] Reviewed-by: Francisco Jerez <[email protected]>
* clover: Query the device to see if images are supportedTom Stellard2014-07-253-1/+8
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* st/mesa,gallium: add a workaround for Unigine Heaven 4.0 and Valley 1.0Marek Olšák2014-07-182-0/+3
| | | | | | | Most (all?) Unigine shaders fail to compile without this if sample shading is advertised. This is, of course, Unigine developers' fault. Reviewed-by: Brian Paul <[email protected]>
* clover: Call end_query before getting timestamp result v2Tom Stellard2014-07-171-0/+1
| | | | | | | | | | | v2: - Move the end_query() call into the timestamp constructor. - Still pass false as the wait parameter to get_query_result(). Reviewed-by: Niels Ole Salscheider <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> CC: "10.2" <[email protected]>
* st/dri: merge dri/drm and dri/sw backendsEmil Velikov2014-07-1024-184/+89
| | | | | | | | | | | | | | Move the driver_name to dri2/drisw and remove all the SPLIT_TAGETS mayhem. In the next step we'll unify the dri and dri-swrast targets, completing the gallium DRI megadriver. v2: Remove leftover st/dri Makefiles from CONFIG_FILES. Spotted by Thomas Helland. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* targets/dri-swrast: convert to gallium megadrivers :)Emil Velikov2014-07-102-2/+4
| | | | | | | | | | | | | | Export the approapriate new symbol, and keep backwards compat via the megadriver_stub helper library. Our next step would be to unify dri/drm and dri/sw, leading to a complete megadrivers solution, and having a single library that provides dri across all targets. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* st/dri/drm: remove __driDriverExtensions and driDriverAPIEmil Velikov2014-07-101-22/+0
| | | | | | | | | | | | ... and use libmegadriver_stub as their provider. Teach scons how to build the library archive and use it. v2: scons: fix build on a drm-less system. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* targets/dri: Add __driDriverGetExtensions_nouveau symbolEmil Velikov2014-07-102-0/+24
| | | | | | | | | | | | | The symbol is introduced by the mesa megadrivers, and adding gallium support for it will allow us to merge st/dri/drm and st/dri/sw. Resulting in a single dri library across gallium. v2: Rebase on top of gallium dri3. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* st/xa: Don't close the drm fd on failure v2Thomas Hellstrom2014-07-031-1/+6
| | | | | | | | | | | | | | | | If XA fails to initialize with pipe_loader enabled, the pipe_loader's cleanup function will close the drm file descriptor. That's pretty bad because the file descriptor will probably be the X server driver's only connection to drm. Temporarily solve this by dup()'ing the file descriptor before handing it over to the pipe loader. This fixes freedesktop.org bugzilla bug #80645. v2: Fix CC addresses. Cc: "10.2" <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* clover: Fix not setting build log if the build succeeds v2Matt Arsenault2014-07-025-13/+24
| | | | | | | | | If there were only warnings, they would not be added to the log. v2: - Use compat::string. Reviewed-by: Francisco Jerez <[email protected]>
* clover: Have compat::string allocate its own memory.Francisco Jerez2014-07-022-5/+7
|
* st/dri: Remove the old libdridrm libraryEmil Velikov2014-07-021-10/+3
| | | | | | | | | | With all the hw drivers converted, we can go back to having a single libdridrm provider. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* targets/dri-vmwgfx: Convert to static/shared pipe-driversEmil Velikov2014-07-021-1/+1
| | | | | | | | | | | | | | | Convert the final hardware driver to a single dri provider which includes all the pipe-drivers. Update the scons build and drop the unused vmw_powf.c. Cc: José Fonseca <[email protected]> Cc: Brian Paul <[email protected]> Cc: Jakob Bornecrantz <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* st/dri/drm: Add a second libdridrm libraryEmil Velikov2014-07-021-1/+9
| | | | | | | | | | | Will be used to create the single dri target library, on our way to convert all the dri targets during the conversion to to static/shared pipe-drivers. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* st/dri: Allow separate dri-targetsEmil Velikov2014-07-027-2/+56
| | | | | | | | | | | With this commit we add a couple of DEFINES making the ST code conditional, in a way that we can use it to gradually convert the dri-targets from separate libraries into a single one. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
* gallium: add an index argument to create_queryIlia Mirkin2014-07-011-1/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* targets/egl-static: use inline_drm_helper and Automake.inc helpersEmil Velikov2014-06-301-4/+5
| | | | | | | | | | | | | Update all three build systems, and add freedreno to the android build. Pending future work on the ST we can convert egl-static to provide either static or dynamic access to the pipe-drivers. There is no functional change with this patch. v2: Don't add freedreno to android build, drop the wrapper winsys. Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* targets/gbm: convert to static/shared pipe-driverEmil Velikov2014-06-303-20/+66
| | | | | | | | | | Move the gbm "target" code to the state-tracker, similar to other - dri, omx, vdpau... ST. v2: Drop inclusion of the wrapper winsys and softpipe/llvmpipe. Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* targets/xa: provide alternative(static) xa targetEmil Velikov2014-06-302-5/+14
| | | | | | | | | | | | | | | | Now we can build the xa target (libxatracker) with either static pipe-drivers or shared ones. Currently we default to static. - Remove the unused CFLAGS/CPPFLAGS. - Use GALLIUM_TARGET_CFLAGS where applicable. v2: Update the printout messages at configure. v3: Drop inclusion of the wrapper winsys and softpipe/llvmpipe. Cc: Jakob Bornecrantz <[email protected]> Cc: Rob Clark <[email protected]> Cc: Thomas Hellstrom <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* st/omx: strcpy the string into the allocated bufferEmil Velikov2014-06-281-3/+3
| | | | | | | | | | This fixes commit a001ca98e15(st/omx: keep the name, (name|role)_specific strings dynamically allocated) in which we dynamically allocated the buffers for name and (name|role)_specific yet forgot to copy the encoder strings into them. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80614 Signed-off-by: Emil Velikov <[email protected]>
* st/omx: keep the name, (name|role)_specific strings dynamically allocatedEmil Velikov2014-06-272-9/+52
| | | | | | | | | | ... as it's caller (the external program omxregister-bellagio) is the one who frees all of the allocated memory. Reported-by: Pedretti Fabio <[email protected]> Tested-by: Fabio Pedretti <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/dri2: implement blitImageAxel Davy2014-06-271-3/+51
| | | | | | | | | V3: call flush_resource before flush V4: Add new flags Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: Add __DRIimageDriverExtension support to galliumAxel Davy2014-06-271-183/+286
| | | | | | | | | | | | | | | | | | __DRIimageDriverExtension is used by GLX DRI3 and Wayland. This patch is a rewrite of http://lists.freedesktop.org/archives/mesa-dev/2014-May/060318.html and http://lists.freedesktop.org/archives/mesa-dev/2014-May/060317.html Previous patches were: Signed-off-by: Ben Skeggs <[email protected]> Signed-off-by: Keith Packard <[email protected]> Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/omx: avoid using dynamic vid_(enc|dec)_base and avc_(name|role)Emil Velikov2014-06-264-94/+18
| | | | | | | | | | | | | | | | | | | | | | | | Strictly speaking we should not have done this in the first place, as all of the above should be static across the system. Currently this may cause some minor issues, which will be resolved in the following patches, by providing a single library for the OMX api. Cleanup a few unneeded strcpy cases while we're around. Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio If you have more than one omx library (libomx-radeonsi, libomx-r600), make sure to temporary move the unused one. By the end of the series there will be only one library that will be used for all hardware - r600, radeonsi and nouveau. Cc: Leo Liu <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* st/omx: provide constant number of componentsEmil Velikov2014-06-261-8/+7
| | | | | | | | | | | | The number of components and their names/roles should be kept constant as all of that information cached. Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio. Cc: Leo Liu <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* clover: Calculate the serialized size of a module efficiently.Francisco Jerez2014-06-193-4/+34
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Optimize module serialization for vectors of fundamental types.Francisco Jerez2014-06-191-1/+22
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Don't use llvm's global contextTom Stellard2014-06-191-6/+9
| | | | | | | | | | An LLVMContext should only be accessed by a single and using the global context was causing crashes in multi-threaded environments. Now we use a separate context for each compile. Reviewed-by: Francisco Jerez <[email protected]> CC: "10.1 10.2" <[email protected]>
* clover: Prevent Clang from printing number of errors and warnings to stderr.Tom Stellard2014-06-191-0/+5
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=78581 CC: "10.1 10.2" <[email protected]>
* st/omx/enc: implement h264 level supportLeo Liu2014-06-181-0/+39
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/st/omx: fix switch-case indentation in vid_enc.cLeo Liu2014-06-181-16/+16
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* clover: query driver for the max number of compute unitsBruno Jiménez2014-06-123-1/+8
| | | | | Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* egl/gallium: Set defines for supported APIs when using automakeNiels Ole Salscheider2014-06-121-0/+20
| | | | | | | | | | | | This fixes automake builds which are broken since b52a530ce2aada1967bc8fefa83ab53e6a737dae. v2: This patch also adds the FEATURE_* defines back to targets/egl-static for Android and Scons that have been removed in the mentioned commit. Signed-off-by: Niels Ole Salscheider <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79885 Reviewed-by: Emil Velikov <[email protected]>
* gbm: Remove 64x64 restriction from GBM_BO_USE_CURSORMichel Dänzer2014-06-121-1/+1
| | | | | | | | | | GBM_BO_USE_CURSOR_64X64 is kept so that existing users of GBM continue to build, but it no longer rejects widths or heights other than 64. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79809 Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* st/omx/enc: enable b framesLeo Liu2014-06-042-3/+5
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx/enc: implement h264 profile supportLeo Liu2014-06-042-2/+49
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* wgl: Disable CRT message boxes when Windows system error messages boxes are ↵José Fonseca2014-06-041-0/+2
| | | | | | | | | | disabled. At least on MSVC we statically link against the CRT, so we must disable the CRT message boxes if we want unattended testing. The messages are convenient when running manually, so let them be if the system error message boxes are not disabled.
* st/wgl: use _debug_printf() instead of fprintf()Brian Paul2014-05-301-7/+3
| | | | | | | | This should print output both for debug and release builds. Suggested by Jose. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: formatting fixes in stw_framebuffer.cBrian Paul2014-05-301-82/+70
| | | | | | And remove some unneeded #includes and INLINE qualifiers. Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: make stw_lookup_context_locked() an inline functionBrian Paul2014-05-302-15/+9
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: fix implementation of wglCreateContextAttribsARB()Brian Paul2014-05-303-22/+136
| | | | | | | | | | | | | | | | | | | | wglCreateContextAttribsARB() didn't work previously since it returned a context ID that wasn't allocated by OPENGL32.DLL. So if that context ID was later passed to wglMakeCurrent(), etc. it was rejected. Now when wglCreateContextAttribsARB() is called we actually call wglCreateContext() in order to get a valid context ID. Then we replace the context data which was created with new context data which reflects the arguments passed to wglCreateContextAttribsARB(). If there were a DrvCreateContextAttribs() function in the ICD this work-around wouldn't be necessary. Reviewed-by: Charmaine Lee <[email protected]> Conflicts: src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c src/gallium/state_trackers/wgl/stw_getprocaddress.c
* st/wgl: add debug code to check that pixel format initialization workedBrian Paul2014-05-301-3/+9
| | | | | | | If the assertion fails, it means something is really broken. Before, if this happened we reverted to the GDI renderer without any warning. Reviewed-by: Matthew McClure <[email protected]>
* st/wgl: change PFD_SWAP_COPY to PFD_SWAP_EXCHANGE.Brian Paul2014-05-301-1/+1
| | | | | | | | To reflect our actual SwapBuffers implementation. See stw_st_swap_framebuffer_locked(). This fixes various rendering issues with SolidEdge. Reviewed-by: Jose Fonseca <[email protected]>
* st/egl: do not link against libloaderEmil Velikov2014-05-291-1/+0
| | | | | | | | | | | | | | | | | Move the link to the final targets, like any other place in mesa/gallium. This allows better visibilty and will prevent us from including the library archive twice. Resolves multiple definition of `loader_get_pci_id_for_fd' multiple definition of `loader_get_pci_id_for_fd' Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79263 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79382 Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chia-I Wu <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* st/omx/enc: implement restricted b frames patternLeo Liu2014-05-272-2/+10
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/egl: st_profiles are build time decision, treat them as suchEmil Velikov2014-05-254-10/+28
| | | | | | | | | | | The profiles are present depending on the defines at build time. Drop the extra functions and feed the defines directly into the state-tracker at build time. v2: Drop unused variable i. Acked-by: Chia-I Wu <[email protected]> (v1) Signed-off-by: Emil Velikov <[email protected]>