bug report involving global buffers and domains not starting at 0,0

Discussion created by sgratton on Jun 22, 2009
uncertainty over the domain for which output occurs


Hi there,


An old issue, first mentioned in:


still seems to be present unfortunately.  Consider a simple IL program that writes wWinCoord.x to either o0 or g[int(wWinCoord.x)] or both, operating on a 1d domain (CALdomain dom={a,0,w,0}.  If

A: you a run a program with a output buffer o0 for output, non-zero output appears in the output buffer for elements from a to a+w-1 

B: you run a program with a global buffer g[] for output, non-zero output appears from a to w-1

C: you run a program with both o0 and g[] for output, non-zero output appears in both buffers form a to a+w-1.

The kind of program I have in mind in case C is...


dcl_input_position_interp(linear_noperspective) vWinCoord0.xy__

dcl_output_generic o0

ftoi r0,vWinCoord0.xy00

itof r1,r0

mov g[r0.x],r1.x

mov o0,r1.x




For case A comment out the mov g[r0.x],r1.x  whereas for case B comment out dcl_output_generic o0 and mov o0,r1.x.

Note the difference in the element for which output ends.  When output buffers are involved, it is as though the last two elements of a CALdomain give you the width and height whereas without output buffers the last two elements give you the bottom right corner.