i965: fix incorrect tex unit in emit_tex() and emit_txb()
The instructions we're translating already went through the brw_wm_pass_fp() function which does the sampler->texture unit mapping. We were applying the sample->unit mapping a second time in the GLSL texture emitters. Often, this made no difference but other times it could lead to accessing an invalid texture and could cause a GPU lockup.
This commit is contained in:
parent
81a101b5be
commit
a9a6399cd3
|
@ -2623,7 +2623,8 @@ static void emit_txb(struct brw_wm_compile *c,
|
|||
{
|
||||
struct brw_compile *p = &c->func;
|
||||
struct brw_reg dst[4], src[4], payload_reg;
|
||||
GLuint unit = c->fp->program.Base.SamplerUnits[inst->TexSrcUnit];
|
||||
/* Note: TexSrcUnit was already looked up through SamplerTextures[] */
|
||||
const GLuint unit = inst->TexSrcUnit;
|
||||
GLuint i;
|
||||
GLuint msg_type;
|
||||
|
||||
|
@ -2689,7 +2690,8 @@ static void emit_tex(struct brw_wm_compile *c,
|
|||
{
|
||||
struct brw_compile *p = &c->func;
|
||||
struct brw_reg dst[4], src[4], payload_reg;
|
||||
GLuint unit = c->fp->program.Base.SamplerUnits[inst->TexSrcUnit];
|
||||
/* Note: TexSrcUnit was already looked up through SamplerTextures[] */
|
||||
const GLuint unit = inst->TexSrcUnit;
|
||||
GLuint msg_len;
|
||||
GLuint i, nr;
|
||||
GLuint emit;
|
||||
|
|
Loading…
Reference in New Issue