[Mesa-dev] [PATCH 01/12] i965/fs: Define logical framebuffer write opcode.

Francisco Jerez currojerez at riseup.net
Wed Jul 22 01:00:22 PDT 2015


Kenneth Graunke <kenneth at whitecape.org> writes:

> On Thursday, July 16, 2015 06:41:16 PM Francisco Jerez wrote:
>> The logical variant is largely equivalent to the original opcode but
>> instead of taking a single payload source it expects the arguments
>> that make up the payload separately as individual sources, like:
>> 
>>  fb_write_logical null, color0, color1, src0_alpha,
>>                         src_depth, dst_depth, sample_mask, num_components
>> 
>> This patch defines the opcode and usual instruction boilerplate,
>> including a placeholder lowering function provided mostly as
>> self-documentation of its source registers.
>> ---
>>  src/mesa/drivers/dri/i965/brw_defines.h  |  1 +
>>  src/mesa/drivers/dri/i965/brw_fs.cpp     | 34 ++++++++++++++++++++++++++++++++
>>  src/mesa/drivers/dri/i965/brw_fs.h       |  2 +-
>>  src/mesa/drivers/dri/i965/brw_shader.cpp |  2 ++
>>  4 files changed, 38 insertions(+), 1 deletion(-)
>> 
>> diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
>> index 5bf53e3..65685a9 100644
>> --- a/src/mesa/drivers/dri/i965/brw_defines.h
>> +++ b/src/mesa/drivers/dri/i965/brw_defines.h
>> @@ -875,6 +875,7 @@ enum opcode {
>>      * instructions.
>>      */
>>     FS_OPCODE_FB_WRITE = 128,
>
> I'd like to start including block comments above our virtual opcodes
> describing their sources and semantics - it's a natural place to look
> for that information.
>
> For this, perhaps something like:
>
>   /**
>    * Framebuffer write.
>    *
>    * Source 0: [required] Color 0
>    * Source 1: [optional] Color 1 (for dual source blend messages)
>    * Source 2: [optional] Src0 Alpha
>    * Source 3: [optional] Source Depth (passthrough from the thread payload)
>    * Source 4: [optional] Destination Depth (gl_FragDepth)
>    * Source 5: [optional] Sample Mask (gl_SampleMask)
>    * Source 6: [required] Number of color components (as a UD immediate).
>    */
>

Sounds good to me.  I'll steal your comment for this and write similar
ones for the other logical-send virtual opcodes I've introduced lately.

> Patches 1-10 are:
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>
> Patches 11-12 are:
> Acked-by: Kenneth Graunke <kenneth at whitecape.org>
>
Thanks.

>> +   FS_OPCODE_FB_WRITE_LOGICAL,
>>     FS_OPCODE_BLORP_FB_WRITE,
>>     FS_OPCODE_REP_FB_WRITE,
>>     SHADER_OPCODE_RCP,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150722/2ca35d9d/attachment.sig>


More information about the mesa-dev mailing list