[virglrenderer-devel] [PATCH 7/9] shader: convert texture writemasks over to a string conversion

Dave Airlie airlied at gmail.com
Tue Jun 5 04:40:45 UTC 2018


On 5 June 2018 at 13:34, Gurchetan Singh <gurchetansingh at chromium.org> wrote:
> On Mon, Jun 4, 2018 at 7:31 PM Dave Airlie <airlied at gmail.com> wrote:
>>
>> From: Dave Airlie <airlied at redhat.com>
>>
>> ---
>>  src/vrend_shader.c | 88 +++++++++++++++++++++++++++++++++++-------------------
>>  1 file changed, 58 insertions(+), 30 deletions(-)
>>
>> diff --git a/src/vrend_shader.c b/src/vrend_shader.c
>> index a089fb5..01e3af8 100644
>> --- a/src/vrend_shader.c
>> +++ b/src/vrend_shader.c
>> @@ -236,6 +236,33 @@ static inline const char *get_string(enum vrend_type_qualifier key)
>>     return conversion_table[key].string;
>>  }
>>
>> +enum vrend_writemask {
>> +   WRITEMASK_NONE = 0,
>> +   WRITEMASK_X = 1,
>> +   WRITEMASK_XY = 3,
>> +   WRITEMASK_XYZ = 7,
>> +   WRITEMASK_W = 8,
>> +};
>> +
>
> Why not just use TGSI_WRITEMASK_*?  It's already defined for us.

Good point,

I've done a v2.

https://cgit.freedesktop.org/~airlied/virglrenderer/log/?h=virgl-refactor-tex
is the full series.

Dave.


More information about the virglrenderer-devel mailing list