summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/d3dadapter9
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-04-22 17:35:27 -0400
committerMarek Olšák <[email protected]>2019-04-23 21:20:24 -0400
commite3841368f34afe844bab25010b89f497cacc1dad (patch)
tree5dcaf1e355321eff38c1c7727ef02a05bbd03cbf /src/gallium/targets/d3dadapter9
parenta20800f49d1d665c4d93dcca87face1320423476 (diff)
gallium: replace DRM_CONF_THROTTLE with PIPE_CAP_MAX_FRAMES_IN_FLIGHT
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/targets/d3dadapter9')
-rw-r--r--src/gallium/targets/d3dadapter9/drm.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c
index 1d01d4a067c..1c8460f7f03 100644
--- a/src/gallium/targets/d3dadapter9/drm.c
+++ b/src/gallium/targets/d3dadapter9/drm.c
@@ -205,7 +205,6 @@ drm_create_adapter( int fd,
struct d3dadapter9drm_context *ctx = CALLOC_STRUCT(d3dadapter9drm_context);
HRESULT hr;
bool different_device;
- const struct drm_conf_ret *throttle_ret = NULL;
const struct drm_conf_ret *dmabuf_ret = NULL;
driOptionCache defaultInitOptions;
driOptionCache userInitOptions;
@@ -237,7 +236,6 @@ drm_create_adapter( int fd,
}
dmabuf_ret = pipe_loader_configuration(ctx->dev, DRM_CONF_SHARE_FD);
- throttle_ret = pipe_loader_configuration(ctx->dev, DRM_CONF_THROTTLE);
if (!dmabuf_ret || !dmabuf_ret->val.val_bool) {
ERR("The driver is not capable of dma-buf sharing."
"Abandon to load nine state tracker\n");
@@ -245,11 +243,9 @@ drm_create_adapter( int fd,
return D3DERR_DRIVERINTERNALERROR;
}
- if (throttle_ret && throttle_ret->val.val_int != -1) {
- ctx->base.throttling = TRUE;
- ctx->base.throttling_value = throttle_ret->val.val_int;
- } else
- ctx->base.throttling = FALSE;
+ ctx->base.throttling_value =
+ ctx->base.hal->get_param(ctx->base.hal, PIPE_CAP_MAX_FRAMES_IN_FLIGHT);
+ ctx->base.throttling = ctx->base.throttling_value > 0;
driParseOptionInfo(&defaultInitOptions, __driConfigOptionsNine);
driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "nine", NULL);