summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/externalobjects.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fix incorrect type when allocating arraysAndres Rodriguez2018-02-071-4/+4
| | | | | | | | | The array members are have type 'struct gl_buffer_object *' Found by coverity. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove usage of alloca in externalobjects.c v4Andres Rodriguez2018-02-011-12/+48
| | | | | | | | | | | | Don't want an overly large numBufferBarriers/numTextureBarriers to blow up the stack. v2: handle malloc errors v3: fix patch v4: initialize texObjs/bufObjs Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Andres Rodriguez <[email protected]>
* mesa: fix error codes for importing memory/semaphore FDsAndres Rodriguez2018-01-301-2/+2
| | | | | | | | | This fixes the following piglit tests: spec/ext_semaphore_fd/api-errors/import-semaphore-fd-bad-enum spec/ext_memory_object_fd/api-errors/import-memory-fd-bad-enum Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: add support for semaphore object signal/wait v4Andres Rodriguez2018-01-301-5/+33
| | | | | | | | | | | | | | Bits to implement ServerWaitSemaphoreObject/ServerSignalSemaphoreObject v2: - corresponding changes for gallium fence->semaphore rename - flushing moved to mesa/main v3: s/semaphore/fence for pipe objects v4: add bitmap flushing Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add support for semaphore object signal/wait v3Andres Rodriguez2018-01-301-0/+38
| | | | | | | | | | Memory synchronization is left for a future patch. v2: flush vertices/bitmaps moved to mesa/main v3: removed spaces before/after braces Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add semaphore parameter stub v2Andres Rodriguez2018-01-301-0/+22
| | | | | | | | | | EXT_semaphore and EXT_semaphore_fd define no pnames. Therefore there isn't much to do besides determining the correct error code. v2: removed useless return Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add support for semaphore object creation/import/delete v3Andres Rodriguez2018-01-301-1/+133
| | | | | | | | | | Used by EXT_semmaphore and EXT_semaphore_fd v2: Removed unnecessary dummy callback initialization v3: Fixed attempting to free the DummySemaphoreObject Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: minor tidy up for memory object error stringsAndres Rodriguez2017-11-141-16/+14
| | | | | Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: only expose EXT_memory_object functions if the ext is supportedSamuel Pitoiset2017-08-221-0/+51
| | | | | | | | | They should not be exposed when the extension is unsupported. Note that ARB_direct_state_access is always exposed and EXT_semaphore is not supported at all. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: only expose glImportMemoryFdEXT if the ext is supportedSamuel Pitoiset2017-08-221-0/+6
| | | | | | | | | | | | | | | From the EXT_external_objects_fd spec: "If the GL_EXT_memory_object_fd string is reported, the following commands are added: void ImportMemoryFdEXT(uint memory, uint64 size, enum handleType, int fd);" Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: hook up memory object multisamples tex(ture)storage apiAndres Rodriguez2017-08-061-6/+40
| | | | | | | | V2 (Timothy): - error check memory == 0 before lookup Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: hook up memoryobject tex(ture)storage apiAndres Rodriguez2017-08-061-10/+118
| | | | | | | | | | | V2 (Timothy Arceri): - formating fixes V3 (Timothy): - error check memory == 0 before lookup Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add support for memory object parametersAndres Rodriguez2017-08-061-0/+50
| | | | | | | | | | | | V2 (Timothy Arceri): - fix copy and paste error with error message V3 (Timothy Arceri): - drop the Protected field for now as its unused Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add support for memory object creation/import/deleteAndres Rodriguez2017-08-061-2/+136
| | | | | | | | | | | | | | | | | | | | | | Used by EXT_external_objects and EXT_external_objects_fd V2 (Timothy Arceri): - Throw GL_OUT_OF_MEMORY error if CreateMemoryObjectsEXT() fails. - C99 tidy ups - remove void cast (Constantine Kharlamov) V3 (Timothy Arceri): - rename mo -> memObj - check that the object is not NULL before initializing - add missing "EXT" in function error message V4 (Timothy Arceri): - remove checks for (memory objecy id == 0) and catch in _mesa_lookup_memory_object() instead. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mapi: add EXT_external_objects and EXT_external_objects_fdAndres Rodriguez2017-08-061-0/+257
Includes implementation stubs. Signed-off-by: Andres Rodriguez <[email protected]> Acked-by: Timothy Arceri <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>