driconfig: add a new engine name/version parameter
[mesa.git] / src / gallium / targets / d3dadapter9 / drm.c
index 4418ceb93d6c9b034b81748077f34c18f3c9ff36..819aa59468cd2b86223e63b557792fd29a7dd186 100644 (file)
@@ -59,6 +59,8 @@ DRI_CONF_BEGIN
         DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE("true")
         DRI_CONF_NINE_TEARFREEDISCARD("false")
         DRI_CONF_NINE_CSMT(-1)
+        DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND("false")
+        DRI_CONF_NINE_SHADERINLINECONSTANTS("false")
     DRI_CONF_SECTION_END
 DRI_CONF_END;
 
@@ -241,12 +243,15 @@ drm_create_adapter( int fd,
         return D3DERR_DRIVERINTERNALERROR;
     }
 
-    ctx->base.throttling_value =
-       ctx->base.hal->get_param(ctx->base.hal, PIPE_CAP_MAX_FRAMES_IN_FLIGHT);
+    /* Previously was set to PIPE_CAP_MAX_FRAMES_IN_FLIGHT,
+     * but the change of value of this cap to 1 seems to cause
+     * regressions. */
+    ctx->base.throttling_value = 2;
     ctx->base.throttling = ctx->base.throttling_value > 0;
 
     driParseOptionInfo(&defaultInitOptions, __driConfigOptionsNine);
-    driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "nine", NULL);
+    driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0,
+                        "nine", NULL, NULL, 0);
     if (driCheckOption(&userInitOptions, "throttle_value", DRI_INT)) {
         throttling_value_user = driQueryOptioni(&userInitOptions, "throttle_value");
         if (throttling_value_user == -1)
@@ -267,13 +272,6 @@ drm_create_adapter( int fd,
     else
         ctx->base.thread_submit = different_device;
 
-    if (ctx->base.thread_submit && (throttling_value_user == -2 || throttling_value_user == 0)) {
-        ctx->base.throttling_value = 0;
-    } else if (ctx->base.thread_submit) {
-        DBG("You have set a non standard throttling value in combination with thread_submit."
-            "We advise to use a throttling value of -2/0");
-    }
-
     if (driCheckOption(&userInitOptions, "override_vendorid", DRI_INT)) {
         override_vendorid = driQueryOptioni(&userInitOptions, "override_vendorid");
     }
@@ -298,6 +296,16 @@ drm_create_adapter( int fd,
     else
         ctx->base.csmt_force = -1;
 
+    if (driCheckOption(&userInitOptions, "dynamic_texture_workaround", DRI_BOOL))
+        ctx->base.dynamic_texture_workaround = driQueryOptionb(&userInitOptions, "dynamic_texture_workaround");
+    else
+        ctx->base.dynamic_texture_workaround = FALSE;
+
+    if (driCheckOption(&userInitOptions, "shader_inline_constants", DRI_BOOL))
+        ctx->base.shader_inline_constants = driQueryOptionb(&userInitOptions, "shader_inline_constants");
+    else
+        ctx->base.shader_inline_constants = FALSE;
+
     driDestroyOptionCache(&userInitOptions);
     driDestroyOptionInfo(&defaultInitOptions);