diff options
author | Jordan Justen <[email protected]> | 2015-04-21 00:31:12 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2015-05-02 00:49:59 -0700 |
commit | 17233f9bbcbf570f0c7633c63dbd5ed88634ed60 (patch) | |
tree | 824c3cf4a06c57f1a18ad1a9d59795790ad71899 /src/mesa/drivers/dri/i965/brw_vec4.cpp | |
parent | 932045061b5850368e8a4a5b3e6609eba6ed8d66 (diff) |
i965: Add brw_setup_tex_for_precompile. Use in VS, GS & FS.
Suggested-by: Kristian Høgsberg <[email protected]>
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 57b507d7f63..973679122cd 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1912,18 +1912,7 @@ brw_vue_setup_prog_key_for_precompile(struct gl_context *ctx, struct brw_context *brw = brw_context(ctx); key->program_string_id = id; - const bool has_shader_channel_select = brw->is_haswell || brw->gen >= 8; - unsigned sampler_count = _mesa_fls(prog->SamplersUsed); - for (unsigned i = 0; i < sampler_count; i++) { - if (!has_shader_channel_select && (prog->ShadowSamplers & (1 << i))) { - /* Assume DEPTH_TEXTURE_MODE is the default: X, X, X, 1 */ - key->tex.swizzles[i] = - MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_ONE); - } else { - /* Color sampler: assume no swizzling. */ - key->tex.swizzles[i] = SWIZZLE_XYZW; - } - } + brw_setup_tex_for_precompile(brw, &key->tex, prog); } } /* extern "C" */ |