[17/17] radeonsi: advertise support for GL_EXT_semaphore

Submitted by Andres Rodriguez on Nov. 2, 2017, 3:57 a.m.

Details

Message ID 20171102035720.6839-18-andresx7@gmail.com
State New
Headers show
Series "Add support for GL_EXT_semaphore" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Andres Rodriguez Nov. 2, 2017, 3:57 a.m.
Expose the feature only when we have syncobj support available

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
---
 src/gallium/drivers/radeonsi/si_pipe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 0077aa2..8e17789 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -573,6 +573,9 @@  static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 			return RADEON_SPARSE_PAGE_SIZE;
 		return 0;
 
+	case PIPE_CAP_SEMAPHORE:
+		return sscreen->b.info.has_syncobj;
+
 	/* Unsupported features. */
 	case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
 	case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
@@ -590,7 +593,6 @@  static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_POST_DEPTH_COVERAGE:
 	case PIPE_CAP_TILE_RASTER_ORDER:
 	case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
-	case PIPE_CAP_SEMAPHORE:
 		return 0;
 
 	case PIPE_CAP_NATIVE_FENCE_FD: