/* Z buffer */
case PIPE_FORMAT_Z16_UNORM:
- /* Z buffer with stencil */
- case PIPE_FORMAT_Z24S8_UNORM:
return usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL;
+ /* Z buffer with stencil or texture */
+ case PIPE_FORMAT_Z24S8_UNORM:
+ return usage &
+ (PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
+ PIPE_TEXTURE_USAGE_SAMPLER);
+
/* Definitely unsupported formats. */
/* Non-usable Z buffer/stencil formats. */
case PIPE_FORMAT_Z24X8_UNORM:
/* DXT5 */
case PIPE_FORMAT_DXT5_RGBA:
return R300_EASY_TX_FORMAT(Y, Z, W, X, DXT5);
+ /* W24_FP */
+ case PIPE_FORMAT_Z24S8_UNORM:
+ return R300_EASY_TX_FORMAT(X, X, X, X, W24_FP);
default:
debug_printf("r300: Implementation error: "
"Got unsupported texture format %s in %s\n",
pf_name(format), __FUNCTION__);
+ assert(0);
break;
}
return 0;