[Mesa-dev] [PATCH 1/4] i965: Use Haswell's sample_d_c for textureGrad with shadow samplers.

Anuj Phogat anuj.phogat at gmail.com
Tue Jan 15 23:54:12 PST 2013


On Tue, Jan 8, 2013 at 3:10 AM, Eric Anholt <eric at anholt.net> wrote:
> Kenneth Graunke <kenneth at whitecape.org> writes:
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
>> index 63f09fe..0c2b696 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
>> @@ -387,8 +387,11 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
>>        msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_RESINFO;
>>        break;
>>        case SHADER_OPCODE_TXD:
>> -      /* There is no sample_d_c message; comparisons are done manually */
>> -      msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS;
>> +         if (inst->shadow_compare) {
>
> maybe an assert(intel->is_haswell) with a note that otherwise it had
> been lowered, here and in the vs?
>
Following 2 gles3 conformance test cases fail after this commit (899017f):
1. shadow_execution_frag.test
GTF3: brw_fs_emit.cpp:392: Assertion `intel->is_haswell' failed
2. shadow_execution_vert.test
GTF3: brw_vec4_emit.cpp:283: Assertion `intel->is_haswell' failed.
Probably inst->shadow_compare is set incorrectly for Gen6. Both test cases
pass if we set inst->shadow_compare = false for Gen6.


More information about the mesa-dev mailing list