st/mesa: use shader stencil export to accelerate shader drawpixels.
If the pipe driver has shader stencil export we can accelerate DrawPixels using it. It tries to pick an S8 texture and works its way to X24S8 and S8X24 if that isn't supported.
This commit is contained in:
@@ -398,11 +398,20 @@ st_translate_fragment_program(struct st_context *st,
|
||||
outputsWritten &= ~(1 << FRAG_RESULT_DEPTH);
|
||||
}
|
||||
|
||||
if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) {
|
||||
fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_STENCIL;
|
||||
fs_output_semantic_index[fs_num_outputs] = 0;
|
||||
outputMapping[FRAG_RESULT_STENCIL] = fs_num_outputs;
|
||||
fs_num_outputs++;
|
||||
outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
|
||||
}
|
||||
|
||||
/* handle remaning outputs (color) */
|
||||
for (attr = 0; attr < FRAG_RESULT_MAX; attr++) {
|
||||
if (outputsWritten & BITFIELD64_BIT(attr)) {
|
||||
switch (attr) {
|
||||
case FRAG_RESULT_DEPTH:
|
||||
case FRAG_RESULT_STENCIL:
|
||||
/* handled above */
|
||||
assert(0);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user