🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #212

Re: Q+ graphics, 24-bit loads and stores

#212
From: Robert Finch
Date: Mon, 19 Oct 2026 02:46
53 lines
3647 bytes
On 2026-10-18 1:50 p.m., MitchAlsup wrote:
> Robert Finch <robfi680@gmail.com> posted:
> 
>> Adding some graphics instructions to Q+. While doing so, it seems to me
>> like 24-bit load and store operations to handle RGB888 data might be handy.
> 
> A lot of GPUs use the other 8-bits as a mixing or transparency code.
>   
>> It is a toss-up deciding to use single precision floats or 18.18 fixed
>> point arithmetic for graphics. The fixed point is about 3x faster
>> latency and a lot smaller. I am leaning towards using single precision
>> floats though.
>>
>> TEX - calculate texture index, TEX Rd, Rs1, Rs2, Rs3 ; Rs1 = U, Rs2 = V,
>> and Rs3 contains the texture width,height and bytes per pixel. The
>> texture cannot be more than 64k pixels high or wide.
>>
>> RGBCVT - convert between RGB formats: eg. RGBCVT r2,r1,10,8 converts
>> RGB8.8.8 to RGB10.10.10
>>
>> BLEND - blend colors
>>
>> TRANSFORM - transform point, performs matrix multiply for point
>> transformation using coefficients that may be set prior to calc.
>>
>>
>>
I have seen a 64-bit masked store operation in another architecture that 
allows suppressing the storage of bytes that match a condition like the 
transparent color or color mixing bits. It seems to me that architecture 
has very application specific instruction. But I had sought to do this 
using generic SIMD or vector instructions.

; vector set not equal, generate mask in r4 for elements of r1 that are 
not equal to r5. R5 would contain the transparent color.
VSNE r4,r1,r5	
; do a masked vector store		
VSTORE r1,(r2+r3),r4

I wonder if it would be possible to have the element/lane size for 
vectors specified in bits.

I forgot that the frame buffer expects pixels packed into 256-bit wide 
strips, without allowing a pixel to span strips. The only raw pixel data 
that will map well is 8, 16, or 32 bits per pixel. Other sizes leave 
unused bits in the strip.

Calculating a memory address for a pixel is not as simple as I thought. 
It requires providing a bit offset as well. The video hardware supports 
odd numbers of bits per pixel like 12 or 9 with each color component 
specified separately. It might be better to support pixel fetch and 
store instructions.
Technical Details
Message-ID: <11b409g$1mled$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11apshg$25e7t$1@dont-email.me> <1792092095-5857@newsgrouper.org> <11arq6g$2se7j$1@dont-email.me> <11b0tr2$ljeu$1@dont-email.me> <1792345842-5857@newsgrouper.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Robert Finch <robfi680@gmail.com>
Newsgroups: comp.arch
Subject: Re: Q+ graphics, 24-bit loads and stores
Date: Sun, 18 Oct 2026 22:46:06 -0400
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <11b409g$1mled$1@dont-email.me>
References: <11apshg$25e7t$1@dont-email.me> <1792092095-5857@newsgrouper.org>
 <11arq6g$2se7j$1@dont-email.me> <11b0tr2$ljeu$1@dont-email.me>
 <1792345842-5857@newsgrouper.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Oct 2026 02:46:08 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1791437"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18M190KjldEn6cjn5Fou/KjgIel6KZt8iM="; posting-host="c158611696cf9495cb9f6ebbb11e2ab6"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:UGUlYAT9utmLn+2Da66hAifcqR4= sha256:iGriD3ZzRBiTy/taxjfRTELJfibM5NHca8sSjO4dP+Y=
	sha1:/fF9jyEvfC3KWiYnxEY892IFNbY= sha256:RxtgXB/F1yoYhzdVdjk+ERhk/U7EISNK2zmf5jICYU4=
Content-Language: en-US
In-Reply-To: <1792345842-5857@newsgrouper.org>