BOOL tearfree_discard;
int csmt_force;
BOOL dynamic_texture_workaround;
+ BOOL shader_inline_constants;
void (*destroy)( struct d3dadapter9_context *ctx );
};
This->driver_caps.ps_integer = pScreen->get_shader_param(pScreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_INTEGERS);
This->driver_caps.offset_units_unscaled = GET_PCAP(POLYGON_OFFSET_UNITS_UNSCALED);
+ This->context.inline_constants = pCTX->shader_inline_constants;
/* Code would be needed when integers are not available to correctly
* handle the conversion of integer constants */
- This->context.inline_constants = This->driver_caps.vs_integer && This->driver_caps.ps_integer;
+ This->context.inline_constants &= This->driver_caps.vs_integer && This->driver_caps.ps_integer;
nine_ff_init(This); /* initialize fixed function code */
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;
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);
DRI_CONF_DESC(en,gettext("If set to true, use a ram intermediate buffer for dynamic textures. Increases ram usage, which can cause out of memory issues, but can fix glitches for some games.")) \
DRI_CONF_OPT_END
+#define DRI_CONF_NINE_SHADERINLINECONSTANTS(def) \
+DRI_CONF_OPT_BEGIN_B(shader_inline_constants, def) \
+ DRI_CONF_DESC(en,gettext("If set to true, recompile shaders with integer or boolean constants when the values are known. Can cause stutter, but can increase slightly performance.")) \
+DRI_CONF_OPT_END
+
/**
* \brief radeonsi specific configuration options
*/