summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_wm.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-07-28 15:46:02 -0700
committerJordan Justen <[email protected]>2017-10-31 23:36:54 -0700
commit1edf0fe612d595bf1eee711b60db17eb25759f82 (patch)
treee44f32d8e4736377ca829db258d26fd2f7a7a1d3 /src/mesa/drivers/dri/i965/brw_wm.c
parent0610a624a1286cec1b9a0a19be63f46aae518377 (diff)
i965: Don't rely on nir for uses_texture_gather
When a program is restored from the shader cache, prog->nir will be NULL, but prog->info will be restored. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index a1e39b55fcb..2105d1a8f1e 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -339,7 +339,7 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
}
/* gather4 for RG32* is broken in multiple ways on Gen7. */
- if (devinfo->gen == 7 && prog->nir->info.uses_texture_gather) {
+ if (devinfo->gen == 7 && prog->info.uses_texture_gather) {
switch (img->InternalFormat) {
case GL_RG32I:
case GL_RG32UI: {
@@ -377,7 +377,7 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
/* Gen6's gather4 is broken for UINT/SINT; we treat them as
* UNORM/FLOAT instead and fix it in the shader.
*/
- if (devinfo->gen == 6 && prog->nir->info.uses_texture_gather) {
+ if (devinfo->gen == 6 && prog->info.uses_texture_gather) {
key->gen6_gather_wa[s] = gen6_gather_workaround(img->InternalFormat);
}