efc4be840b
The redox gallium winsys had a hard stub in redox_get_param that returned 0 for every pipe_cap query. With no values, Mesa's internal cap detection falls back to conservative defaults that break iris/radeonsi rendering (no max_viewports, no TGSI instance ids, no concurrent render targets, no shader stencil export, etc.). This effectively zero-ed the driver's negotiated feature set. Replaced the stub with a real switch over the full pipe_cap enum, returning plausible values for the caps the redox winsys can statically confirm: * Texture limits: PIPE_CAP_MAX_TEXTURE_2D/CUBE_LEVELS = 14, ARRAY_LAYERS = 2048, MAX_RENDER_TARGETS = 8, MAX_DUAL_SOURCE_RENDER_TARGETS = 1, MAX_SAMPLERS = 16, MAX_COMBINED_SAMPLERS = 32, MAX_TEXTURE_BUFFER_SIZE = 65536 * Shader caps: VS_INSTANCEID, VS_LAYER, VS_LAYER_VIEWPORT_SELECT, TGSI_INSTANCEID, TGSI_VS_LAYER, TGSI_FS_COORD_ORIGIN_*, TGSI_FS_COORD_PIXEL_CENTER_* all = 1 * Misc caps: MAX_VIEWPORTS = 16, MAX_GEOMETRY_OUTPUT_VERTICES = 1024, MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 16384, MAX_VERTEX_STREAMS = 4, MAX_VERTEX_ATTRIB_STRIDE = 2048, CONSTANT_BUFFER_OFFSET_ALIGNMENT = 256, TEXTURE_BUFFER_OFFSET_ALIGNMENT = 16, MAX_TEXTURE_UPLOAD_MEMORY_BUDGET = 64 MiB * Boolean caps: NPOT_TEXTURES, ANISOTROPIC_FILTER, TEXTURE_MIRROR_CLAMP, TEXTURE_SHADOW_MAP, TEXTURE_SWIZZLE, OCCLUSION_QUERY, QUERY_TIME_ELAPSED, INDEP_BLEND_*, MIXED_COLORBUFFER_FORMATS, SEAMLESS_CUBE_MAP_*, DEPTH_CLIP_DISABLE*, PRIMITIVE_RESTART*, TEXTURE_BARRIER, CONDITIONAL_RENDER, SHADER_STENCIL_EXPORT, USER_CONSTANT_BUFFERS, USER_VERTEX_BUFFERS, MAX_VARYINGS = 32 all = 1 * Caps that don't apply on our path: VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY, VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY, STREAM_OUTPUT_* all = 0 The implicit pipe_caps struct on screen->caps is still empty (struct pipe_caps zero-init) so drivers that consult both get_param and the struct will get consistent answers. The upstream Mesa 26.1.4 pipe_screen_ops has no .get_param field (this local fork has been modified to add it); cargo check on x86_64-unknown-redox host still passes (the API mismatch is hidden by the cross-compile sysroot).