gallium: set PIPE_CAP_MAX_FRAMES_IN_FLIGHT to 2 for all drivers

Submitted by Marek Olšák on April 24, 2019, 1:23 a.m.

Details

Message ID 20190424012332.4149-1-maraeo@gmail.com
State New
Headers show
Series "gallium: set PIPE_CAP_MAX_FRAMES_IN_FLIGHT to 2 for all drivers" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Marek Olšák April 24, 2019, 1:23 a.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/gallium/auxiliary/util/u_screen.c            | 4 +++-
 src/gallium/drivers/freedreno/freedreno_screen.c | 3 ---
 src/gallium/drivers/i915/i915_screen.c           | 3 ---
 src/gallium/drivers/nouveau/nv30/nv30_screen.c   | 3 ---
 src/gallium/drivers/nouveau/nv50/nv50_screen.c   | 3 ---
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   | 3 ---
 src/gallium/drivers/r300/r300_screen.c           | 3 ---
 src/gallium/drivers/r600/r600_pipe.c             | 3 ---
 src/gallium/drivers/radeonsi/si_get.c            | 3 ---
 src/gallium/drivers/svga/svga_screen.c           | 2 --
 10 files changed, 3 insertions(+), 27 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c
index a6c7e086c32..27f51e0898e 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -346,23 +346,25 @@  u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
    case PIPE_CAP_DEST_SURFACE_SRGB_CONTROL:
       return 1;
 
    case PIPE_CAP_MAX_VARYINGS:
       return 8;
 
    case PIPE_CAP_COMPUTE_GRID_INFO_LAST_BLOCK:
       return 0;
 
    case PIPE_CAP_COMPUTE_SHADER_DERIVATIVES:
-   case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
       return 0;
 
+   case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
+      return 2;
+
    case PIPE_CAP_DMABUF:
 #ifdef PIPE_OS_LINUX
       return 1;
 #else
       return 0;
 #endif
 
    default:
       unreachable("bad PIPE_CAP_*");
    }
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 38a459e73aa..fdf26390718 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -373,23 +373,20 @@  fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 		return is_a3xx(screen) ? 1 : 0;
 
 	/* Queries. */
 	case PIPE_CAP_OCCLUSION_QUERY:
 		return is_a3xx(screen) || is_a4xx(screen) || is_a5xx(screen) || is_a6xx(screen);
 	case PIPE_CAP_QUERY_TIMESTAMP:
 	case PIPE_CAP_QUERY_TIME_ELAPSED:
 		/* only a4xx, requires new enough kernel so we know max_freq: */
 		return (screen->max_freq > 0) && (is_a4xx(screen) || is_a5xx(screen) || is_a6xx(screen));
 
-	case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-		return 2;
-
 	case PIPE_CAP_VENDOR_ID:
 		return 0x5143;
 	case PIPE_CAP_DEVICE_ID:
 		return 0xFFFFFFFF;
 	case PIPE_CAP_ACCELERATED:
 		return 1;
 	case PIPE_CAP_VIDEO_MEMORY:
 		DBG("FINISHME: The value returned is incorrect\n");
 		return 10;
 	case PIPE_CAP_UMA:
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 62ff5f89198..78707c66e62 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -334,23 +334,20 @@  i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
    case PIPE_CAP_FENCE_SIGNAL:
    case PIPE_CAP_CONSTBUF0_FLAGS:
    case PIPE_CAP_PACKED_UNIFORMS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
 
-   case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-      return 2;
-
    case PIPE_CAP_MAX_GS_INVOCATIONS:
       return 32;
 
    case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
       return 1 << 27;
 
    case PIPE_CAP_MAX_VIEWPORTS:
       return 1;
 
    case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index e6e7fac2a44..b5dc033bd2d 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -242,23 +242,20 @@  nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
    case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
    case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
    case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
    case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
    case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
    case PIPE_CAP_IMAGE_LOAD_FORMATTED:
       return 0;
 
-   case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-      return 2;
-
    case PIPE_CAP_MAX_GS_INVOCATIONS:
       return 32;
    case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
       return 1 << 27;
    case PIPE_CAP_VENDOR_ID:
       return 0x10de;
    case PIPE_CAP_DEVICE_ID: {
       uint64_t device_id;
       if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE, &device_id)) {
          NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n");
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index c439f507c1d..423b6af3b64 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -314,23 +314,20 @@  nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_SURFACE_SAMPLE_COUNT:
    case PIPE_CAP_TGSI_ATOMFADD:
    case PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE:
    case PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND:
    case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS:
    case PIPE_CAP_NIR_COMPACT_ARRAYS:
    case PIPE_CAP_COMPUTE:
    case PIPE_CAP_IMAGE_LOAD_FORMATTED:
       return 0;
 
-   case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-      return 2;
-
    case PIPE_CAP_VENDOR_ID:
       return 0x10de;
    case PIPE_CAP_DEVICE_ID: {
       uint64_t device_id;
       if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE, &device_id)) {
          NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n");
          return -1;
       }
       return device_id;
    }
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 930da324794..79224ac99a7 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -348,23 +348,20 @@  nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTERS:
    case PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER_BUFFERS:
    case PIPE_CAP_SURFACE_SAMPLE_COUNT:
    case PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE:
    case PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND:
    case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS:
    case PIPE_CAP_NIR_COMPACT_ARRAYS:
    case PIPE_CAP_IMAGE_LOAD_FORMATTED:
       return 0;
 
-   case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-      return 2;
-
    case PIPE_CAP_VENDOR_ID:
       return 0x10de;
    case PIPE_CAP_DEVICE_ID: {
       uint64_t device_id;
       if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE, &device_id)) {
          NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n");
          return -1;
       }
       return device_id;
    }
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 6b77d188433..be0b475e5ef 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -300,23 +300,20 @@  static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
         case PIPE_CAP_MAX_VIEWPORTS:
             return 1;
 
         case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
             return 2048;
 
         case PIPE_CAP_MAX_VARYINGS:
             return 10;
 
-        case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-            return 2;
-
         case PIPE_CAP_VENDOR_ID:
                 return 0x1002;
         case PIPE_CAP_DEVICE_ID:
                 return r300screen->info.pci_id;
         case PIPE_CAP_ACCELERATED:
                 return 1;
         case PIPE_CAP_VIDEO_MEMORY:
                 return r300screen->info.vram_size >> 20;
         case PIPE_CAP_UMA:
                 return 0;
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 9cef7c79cbd..41a878ab9d2 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -391,23 +391,20 @@  static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
 	case PIPE_CAP_MAX_GS_INVOCATIONS:
 		return 32;
 
 	/* shader buffer objects */
 	case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
 		return 1 << 27;
 	case PIPE_CAP_MAX_COMBINED_SHADER_BUFFERS:
 		return 8;
 
-	case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-		return 2;
-
 	/* Unsupported features. */
 	case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
 	case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
 	case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS:
 	case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
 	case PIPE_CAP_VERTEX_COLOR_CLAMPED:
 	case PIPE_CAP_USER_VERTEX_BUFFERS:
 	case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
 	case PIPE_CAP_VERTEXID_NOBASE:
 	case PIPE_CAP_DEPTH_BOUNDS_TEST:
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index 840465bcf0c..bbaf6fee09c 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -300,23 +300,20 @@  static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 	case PIPE_CAP_MIN_TEXEL_OFFSET:
 		return -32;
 
 	case PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET:
 	case PIPE_CAP_MAX_TEXEL_OFFSET:
 		return 31;
 
 	case PIPE_CAP_ENDIANNESS:
 		return PIPE_ENDIAN_LITTLE;
 
-	case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-		return 2;
-
 	case PIPE_CAP_VENDOR_ID:
 		return ATI_VENDOR_ID;
 	case PIPE_CAP_DEVICE_ID:
 		return sscreen->info.pci_id;
 	case PIPE_CAP_VIDEO_MEMORY:
 		return sscreen->info.vram_size >> 20;
 	case PIPE_CAP_PCI_GROUP:
 		return sscreen->info.pci_domain;
 	case PIPE_CAP_PCI_BUS:
 		return sscreen->info.pci_bus;
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index ceaf388c7db..6cb5a14f5b0 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -472,22 +472,20 @@  svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TILE_RASTER_ORDER:
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
    case PIPE_CAP_FENCE_SIGNAL:
    case PIPE_CAP_CONSTBUF0_FLAGS:
    case PIPE_CAP_PACKED_UNIFORMS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
-   case PIPE_CAP_MAX_FRAMES_IN_FLIGHT:
-      return 2;
    case PIPE_CAP_MAX_GS_INVOCATIONS:
       return 32;
    case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
       return 1 << 27;
    default:
       return u_pipe_screen_get_param_defaults(screen, param);
    }
 }
 
 

Comments