driconfig: add a new engine name/version parameter
[mesa.git] / src / gallium / targets / d3dadapter9 / drm.c
index b9ae076c544ab026cdb627ba400e6671b9d965c8..819aa59468cd2b86223e63b557792fd29a7dd186 100644 (file)
@@ -60,6 +60,7 @@ DRI_CONF_BEGIN
         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;
 
@@ -242,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)
@@ -268,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");
     }
@@ -304,6 +301,11 @@ drm_create_adapter( int fd,
     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);