It is useful to have this option for shader-db, and it was also good at the time where we were rejecting shaders due to various internal limits we hadn't supported yet. However, at this point the precompile step takes extra time (since not all NOS is known at link time) and spews misleading debug in the common case of debugging a real app. This is left in place for VS, where we still have a couple of codegen failure paths that result in link failure through precompile. Those need to be fixed. shader-db can still get at the debug info it wants using "shader_precompile=true" driconf option. Long term, we can probably build a good-enough app for shader-db to trigger real codegen.tags/mesa-8.0-rc1
@@ -327,6 +327,7 @@ brwCreateContext(int api, | |||
brw_draw_init( brw ); | |||
brw->new_vs_backend = (getenv("INTEL_OLD_VS") == NULL); | |||
brw->precompile = driQueryOptionb(&intel->optionCache, "shader_precompile"); | |||
/* If we're using the new shader backend, we require integer uniforms | |||
* stored as actual integers. |
@@ -604,6 +604,7 @@ struct brw_context | |||
bool has_aa_line_parameters; | |||
bool has_pln; | |||
bool new_vs_backend; | |||
bool precompile; | |||
struct { | |||
struct brw_state_flags dirty; |
@@ -65,7 +65,9 @@ brw_new_shader_program(struct gl_context *ctx, GLuint name) | |||
bool | |||
brw_shader_precompile(struct gl_context *ctx, struct gl_shader_program *prog) | |||
{ | |||
if (!brw_fs_precompile(ctx, prog)) | |||
struct brw_context *brw = brw_context(ctx); | |||
if (brw->precompile && !brw_fs_precompile(ctx, prog)) | |||
return false; | |||
if (!brw_vs_precompile(ctx, prog)) |
@@ -76,10 +76,14 @@ PUBLIC const char __driConfigOptions[] = | |||
DRI_CONF_OPT_BEGIN(stub_occlusion_query, bool, false) | |||
DRI_CONF_DESC(en, "Enable stub ARB_occlusion_query support on 915/945.") | |||
DRI_CONF_OPT_END | |||
DRI_CONF_OPT_BEGIN(shader_precompile, bool, false) | |||
DRI_CONF_DESC(en, "Perform code generation at shader link time.") | |||
DRI_CONF_OPT_END | |||
DRI_CONF_SECTION_END | |||
DRI_CONF_END; | |||
const GLuint __driNConfigOptions = 11; | |||
const GLuint __driNConfigOptions = 12; | |||
#include "intel_batchbuffer.h" | |||
#include "intel_buffers.h" |