[Mesa-dev] RFC: TGSI scalar arrays
Christoph Bumiller
e0425955 at student.tuwien.ac.at
Wed Mar 20 11:09:18 PDT 2013
On 20.03.2013 18:30, Roland Scheidegger wrote:
> Am 20.03.2013 17:46, schrieb Christoph Bumiller:
>> On 20.03.2013 17:05, Roland Scheidegger wrote:
>>>
>>> Not sure I fully understand this, but I'm thinking "whenever in doubt,
>>> use something close to what dx10 does" since that's likely going to work
>>> reasonable with different hw. Maybe declaring those special values
>>> differently (not just as output reg) would help?
>> What DX10 does is making indirect access of varyings illegal. That's not
>> possible with OpenGL ...
> Hmm I thought dcl_indexRange would be used for indirect access of varyings?
Interesting ... when last I tried that back when working on d3d1x, the
compiler didn't like it, and I remember something about indexRange
existing only for debugging (and I remember finding that strange).
Also, d3d11 doesn't have the annoying limit that GLSL has so there is no
need for it to pack varyings.
When I use floats[3] + SV_POSITION, I get "vs_5_0 output limit (32)
exceeded, shader uses 33 outputs", but float4[28] works just fine.
For indirect access I still get:
error X3500: array reference cannot be used as an l-value; not natively
addressable
for
struct IA2VS
{
float4 position : POSITION;
float4 color : COLOR;
};
struct VS2PS
{
float4 position : SV_POSITION;
float4 color[2] : WHATEVER;
};
VS2PS vs(IA2VS input)
{
VS2PS result;
int i = int(input.position.x);
result.position = input.position;
result.color[i] = input.color;
return result;
}
float4 ps(VS2PS input) : SV_TARGET
{
return input.color[0];
}
> Roland
More information about the mesa-dev
mailing list