gallium: fix the front face semantics
mesa allocates both frontface and pointcoord registers within the fog coordinate register, by using swizzling. to make it cleaner and easier for drivers we want each of them in its own register. so when doing compilation from the mesa IR to tgsi allocate new registers for both and add new semantics to the respective declarations.
This commit is contained in:
@@ -137,8 +137,23 @@ find_translated_vp(struct st_context *st,
|
||||
|
||||
for (inAttr = 0; inAttr < FRAG_ATTRIB_MAX; inAttr++) {
|
||||
if (fragInputsRead & (1 << inAttr)) {
|
||||
stfp->input_to_slot[inAttr] = numIn;
|
||||
numIn++;
|
||||
if ((fragInputsRead & FRAG_BIT_FOGC)) {
|
||||
if (stfp->Base.UsesPointCoord) {
|
||||
stfp->input_to_slot[inAttr] = numIn;
|
||||
numIn++;
|
||||
}
|
||||
if (stfp->Base.UsesFrontFacing) {
|
||||
stfp->input_to_slot[inAttr] = numIn;
|
||||
numIn++;
|
||||
}
|
||||
if (stfp->Base.UsesFogFragCoord) {
|
||||
stfp->input_to_slot[inAttr] = numIn;
|
||||
numIn++;
|
||||
}
|
||||
} else {
|
||||
stfp->input_to_slot[inAttr] = numIn;
|
||||
numIn++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
stfp->input_to_slot[inAttr] = UNUSED;
|
||||
|
Reference in New Issue
Block a user