[Mesa-dev] [PATCH] gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)

Kai Wasserbäch kai at dev.carbon-project.org
Sat Aug 27 10:14:20 UTC 2016


Hey Michael,
Michael Schellenberger wrote on 26.08.2016 20:19:
> Am 26.08.2016 um 15:23 schrieb Kai Wasserbäch:
>> [...]
>> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_texture.c b/src/gallium/drivers/nouveau/nv30/nv30_texture.c
>> index 4f4f87e..e5d3db3 100644
>> --- a/src/gallium/drivers/nouveau/nv30/nv30_texture.c
>> +++ b/src/gallium/drivers/nouveau/nv30/nv30_texture.c
>> @@ -188,7 +188,7 @@ nv30_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
>>  
>>  static void
>>  nv30_bind_sampler_states(struct pipe_context *pipe,
>> -                         unsigned shader, unsigned start_slot,
>> +                         enum pipe_shader_type shader, unsigned start_slot,
>>                           unsigned num_samplers, void **samplers)
>>  {
>>     switch (shader) {
>> @@ -198,6 +198,9 @@ nv30_bind_sampler_states(struct pipe_context *pipe,
>>     case PIPE_SHADER_FRAGMENT:
>>        nv30_fragtex_sampler_states_bind(pipe, num_samplers, samplers);
>>        break;
>> +   default:
>> +      assert(!"unexpected shader type");
>> +      break;
> Shouldnt that be unreachable("unexpected shader type")? The break after
> that shouldnt be necessary. Same for other occurrences.

please see my discussion with Eric
(<https://lists.freedesktop.org/archives/mesa-dev/2016-August/127128.html>).

And since Samuel seemed to be ok (he gave me his R-b) with the assert() I'm
going to leave it as is. If some other change would require a v3 I could change it.

Cheers,
Kai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 630 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160827/5a4c4b27/attachment.sig>


More information about the mesa-dev mailing list