gallium: handle drirc disable_glsl_line_continuations option
NOTE: This is a candidate for the 9.1 branch Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -240,6 +240,7 @@ struct st_visual
|
|||||||
struct st_config_options
|
struct st_config_options
|
||||||
{
|
{
|
||||||
boolean force_glsl_extensions_warn;
|
boolean force_glsl_extensions_warn;
|
||||||
|
boolean disable_glsl_line_continuations;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -54,6 +54,8 @@ static void dri_fill_st_options(struct st_config_options *options,
|
|||||||
{
|
{
|
||||||
options->force_glsl_extensions_warn =
|
options->force_glsl_extensions_warn =
|
||||||
driQueryOptionb(optionCache, "force_glsl_extensions_warn");
|
driQueryOptionb(optionCache, "force_glsl_extensions_warn");
|
||||||
|
options->disable_glsl_line_continuations =
|
||||||
|
driQueryOptionb(optionCache, "disable_glsl_line_continuations");
|
||||||
}
|
}
|
||||||
|
|
||||||
GLboolean
|
GLboolean
|
||||||
|
@@ -66,6 +66,7 @@ PUBLIC const char __driConfigOptions[] =
|
|||||||
|
|
||||||
DRI_CONF_SECTION_DEBUG
|
DRI_CONF_SECTION_DEBUG
|
||||||
DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
|
DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
|
||||||
|
DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
|
||||||
DRI_CONF_SECTION_END
|
DRI_CONF_SECTION_END
|
||||||
|
|
||||||
DRI_CONF_SECTION_MISCELLANEOUS
|
DRI_CONF_SECTION_MISCELLANEOUS
|
||||||
@@ -75,7 +76,7 @@ PUBLIC const char __driConfigOptions[] =
|
|||||||
|
|
||||||
#define false 0
|
#define false 0
|
||||||
|
|
||||||
static const uint __driNConfigOptions = 11;
|
static const uint __driNConfigOptions = 12;
|
||||||
|
|
||||||
static const __DRIconfig **
|
static const __DRIconfig **
|
||||||
dri_fill_in_modes(struct dri_screen *screen)
|
dri_fill_in_modes(struct dri_screen *screen)
|
||||||
|
@@ -714,6 +714,9 @@ void st_init_extensions(struct st_context *st)
|
|||||||
if (st->options.force_glsl_extensions_warn)
|
if (st->options.force_glsl_extensions_warn)
|
||||||
ctx->Const.ForceGLSLExtensionsWarn = 1;
|
ctx->Const.ForceGLSLExtensionsWarn = 1;
|
||||||
|
|
||||||
|
if (st->options.disable_glsl_line_continuations)
|
||||||
|
ctx->Const.DisableGLSLLineContinuations = 1;
|
||||||
|
|
||||||
ctx->Const.MinMapBufferAlignment =
|
ctx->Const.MinMapBufferAlignment =
|
||||||
screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT);
|
screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT);
|
||||||
if (ctx->Const.MinMapBufferAlignment >= 64) {
|
if (ctx->Const.MinMapBufferAlignment >= 64) {
|
||||||
|
Reference in New Issue
Block a user