Lines Matching refs:screen
80 void st_init_limits(struct pipe_screen *screen, in st_init_limits() argument
88 c->MaxTextureSize = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_SIZE); in st_init_limits()
91 screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_MB)); in st_init_limits()
94 = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS), in st_init_limits()
98 = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS), in st_init_limits()
104 = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS); in st_init_limits()
115 screen->get_param(screen, PIPE_CAP_RASTERIZER_SUBPIXEL_BITS); in st_init_limits()
117 screen->get_param(screen, PIPE_CAP_VIEWPORT_SUBPIXEL_BITS); in st_init_limits()
120 _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS), in st_init_limits()
124 _clamp(screen->get_param(screen, in st_init_limits()
129 _maxf(1.0f, screen->get_paramf(screen, PIPE_CAPF_MAX_LINE_WIDTH)); in st_init_limits()
131 _maxf(1.0f, screen->get_paramf(screen, PIPE_CAPF_MAX_LINE_WIDTH_AA)); in st_init_limits()
134 _maxf(1.0f, screen->get_paramf(screen, PIPE_CAPF_MAX_POINT_WIDTH)); in st_init_limits()
136 _maxf(1.0f, screen->get_paramf(screen, PIPE_CAPF_MAX_POINT_WIDTH_AA)); in st_init_limits()
143 screen->get_paramf(screen, PIPE_CAPF_MAX_TEXTURE_ANISOTROPY)); in st_init_limits()
146 screen->get_paramf(screen, PIPE_CAPF_MAX_TEXTURE_LOD_BIAS); in st_init_limits()
149 screen->get_param(screen, in st_init_limits()
153 screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, in st_init_limits()
170 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_PREFERRED_IR); in st_init_limits()
172 if (screen->get_compiler_options && prefer_nir) { in st_init_limits()
174 screen->get_compiler_options(screen, PIPE_SHADER_IR_NIR, sh); in st_init_limits()
183 if (!screen->get_param(screen, PIPE_CAP_COMPUTE)) in st_init_limits()
186 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUPPORTED_IRS); in st_init_limits()
193 _min(screen->get_shader_param(screen, sh, in st_init_limits()
199 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS); in st_init_limits()
202 screen->get_shader_param(screen, sh, in st_init_limits()
206 screen->get_shader_param(screen, sh, in st_init_limits()
210 screen->get_shader_param(screen, sh, in st_init_limits()
214 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS); in st_init_limits()
217 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEMPS); in st_init_limits()
222 screen->get_shader_param(screen, sh, in st_init_limits()
230 if (!screen->get_param(screen, PIPE_CAP_CLIP_PLANES)) in st_init_limits()
233 if (!screen->get_param(screen, PIPE_CAP_POINT_SIZE_FIXED)) in st_init_limits()
236 if (screen->get_param(screen, PIPE_CAP_DEPTH_CLIP_DISABLE) == 2) in st_init_limits()
240 if (screen->get_param(screen, PIPE_CAP_DEPTH_CLIP_DISABLE) == 2) in st_init_limits()
243 if (!screen->get_param(screen, PIPE_CAP_ALPHA_TEST)) in st_init_limits()
259 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS) * 4; in st_init_limits()
261 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_OUTPUTS) * 4; in st_init_limits()
265 screen->get_shader_param(screen, sh, in st_init_limits()
276 screen->get_shader_param(screen, sh, in st_init_limits()
279 temp = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS); in st_init_limits()
286 …pc->MaxAtomicBuffers = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_… in st_init_limits()
296 pc->MaxImageUniforms = screen->get_shader_param( in st_init_limits()
297 screen, sh, PIPE_SHADER_CAP_MAX_SHADER_IMAGES); in st_init_limits()
305 if (screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_INTEGERS)) { in st_init_limits()
311 if (screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_INT16)) { in st_init_limits()
318 if (screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_FP16)) { in st_init_limits()
327 screen->get_shader_param(screen, sh, in st_init_limits()
336 !screen->get_shader_param(screen, sh, in st_init_limits()
340 !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES); in st_init_limits()
343 !screen->get_shader_param(screen, sh, in st_init_limits()
347 !screen->get_shader_param(screen, sh, in st_init_limits()
350 !screen->get_shader_param(screen, sh, in st_init_limits()
353 !screen->get_shader_param(screen, sh, in st_init_limits()
356 !screen->get_shader_param(screen, sh, in st_init_limits()
366 MIN2(screen->get_shader_param(screen, sh, in st_init_limits()
371 screen->get_shader_param(screen, sh, in st_init_limits()
374 if (!screen->get_param(screen, PIPE_CAP_NIR_COMPACT_ARRAYS)) in st_init_limits()
383 if (screen->get_param(screen, PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED)) in st_init_limits()
385 if (screen->get_param(screen, PIPE_CAP_PSIZ_CLAMPED)) in st_init_limits()
391 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_FP16); in st_init_limits()
393 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_FP16_DERIVATIVES); in st_init_limits()
395 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_INT16); in st_init_limits()
397 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_GLSL_16BIT_CONSTS); in st_init_limits()
399 screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_FP16_CONST_BUFFERS); in st_init_limits()
411 screen->get_param(screen, PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY); in st_init_limits()
413 screen->get_param(screen, PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF); in st_init_limits()
415 screen->get_param(screen, PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS); in st_init_limits()
417 !screen->get_param(screen, PIPE_CAP_NIR_COMPACT_ARRAYS); in st_init_limits()
419 !screen->get_param(screen, PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED); in st_init_limits()
443 c->MaxVarying = screen->get_param(screen, PIPE_CAP_MAX_VARYINGS); in st_init_limits()
446 screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES); in st_init_limits()
448 screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS); in st_init_limits()
450 screen->get_param(screen, PIPE_CAP_MAX_GS_INVOCATIONS); in st_init_limits()
452 MIN2(screen->get_param(screen, PIPE_CAP_MAX_SHADER_PATCH_VARYINGS), in st_init_limits()
456 screen->get_param(screen, PIPE_CAP_MIN_TEXEL_OFFSET); in st_init_limits()
458 screen->get_param(screen, PIPE_CAP_MAX_TEXEL_OFFSET); in st_init_limits()
461 screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS); in st_init_limits()
463 screen->get_param(screen, PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET); in st_init_limits()
465 screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET); in st_init_limits()
468 screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS); in st_init_limits()
472 screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS); in st_init_limits()
474 screen->get_param(screen, in st_init_limits()
477 MAX2(1, screen->get_param(screen, PIPE_CAP_MAX_VERTEX_STREAMS)); in st_init_limits()
483 = screen->get_param(screen, PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE); in st_init_limits()
488 temp = screen->get_param(screen, PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET); in st_init_limits()
494 screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS); in st_init_limits()
497 screen->get_param(screen, PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT); in st_init_limits()
512 screen->get_param(screen, PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL); in st_init_limits()
514 screen->get_param(screen, PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL); in st_init_limits()
516 screen->get_param(screen, PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL); in st_init_limits()
519 if (screen->get_disk_shader_cache && screen->get_disk_shader_cache(screen)) in st_init_limits()
530 MIN2(screen->get_param(screen, in st_init_limits()
545 screen->get_param(screen, PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTERS); in st_init_limits()
556 screen->get_param(screen, PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT); in st_init_limits()
559 MIN2(screen->get_param(screen, PIPE_CAP_MAX_COMBINED_SHADER_BUFFERS), in st_init_limits()
576 screen->get_param(screen, PIPE_CAP_MAX_SHADER_BUFFER_SIZE); in st_init_limits()
605 screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS); in st_init_limits()
608 screen->get_param(screen, PIPE_CAP_MAX_WINDOW_RECTANGLES); in st_init_limits()
611 screen->get_param(screen, PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE); in st_init_limits()
614 screen->get_param(screen, PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION); in st_init_limits()
617 screen->get_param(screen, PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE); in st_init_limits()
620 screen->get_param(screen, PIPE_CAP_LOAD_CONSTBUF); in st_init_limits()
623 screen->get_param(screen, PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS); in st_init_limits()
626 screen->get_paramf(screen, PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE); in st_init_limits()
628 screen->get_paramf(screen, PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE); in st_init_limits()
630 screen->get_paramf(screen, PIPE_CAPF_CONSERVATIVE_RASTER_DILATE_GRANULARITY); in st_init_limits()
633 temp = screen->get_param(screen, PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES); in st_init_limits()
638 screen->get_param(screen, PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET); in st_init_limits()
642 screen->get_param(screen, PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH); in st_init_limits()
645 screen->get_param(screen, PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE); in st_init_limits()
678 init_format_extensions(struct pipe_screen *screen, in init_format_extensions() argument
696 if (screen->is_format_supported(screen, mapping[i].format[j], in init_format_extensions()
719 get_max_samples_for_formats(struct pipe_screen *screen, in get_max_samples_for_formats() argument
729 if (screen->is_format_supported(screen, formats[f], in get_max_samples_for_formats()
739 get_max_samples_for_formats_advanced(struct pipe_screen *screen, in get_max_samples_for_formats_advanced() argument
750 if (screen->is_format_supported(screen, formats[f], PIPE_TEXTURE_2D, in get_max_samples_for_formats_advanced()
766 void st_init_extensions(struct pipe_screen *screen, in st_init_extensions() argument
1147 if (screen->get_param(screen, cap_mapping[i].cap)) { in st_init_extensions()
1157 init_format_extensions(screen, extensions, rendertarget_mapping, in st_init_extensions()
1160 init_format_extensions(screen, extensions, rt_blendable, in st_init_extensions()
1164 init_format_extensions(screen, extensions, depthstencil_mapping, in st_init_extensions()
1167 init_format_extensions(screen, extensions, texture_mapping, in st_init_extensions()
1170 init_format_extensions(screen, extensions, vertex_mapping, in st_init_extensions()
1175 consts->GLSLVersion = screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL); in st_init_extensions()
1177 screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY); in st_init_extensions()
1180 screen->get_param(screen, PIPE_CAP_ESSL_FEATURE_LEVEL); in st_init_extensions()
1207 screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX); in st_init_extensions()
1224 screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER_VIEWPORT)) { in st_init_extensions()
1237 if (screen->get_param(screen, PIPE_CAP_TGSI_ARRAY_COMPONENTS)) in st_init_extensions()
1245 if (screen->get_param(screen, PIPE_CAP_VERTEXID_NOBASE)) { in st_init_extensions()
1262 if (screen->get_param(screen, PIPE_CAP_OPENCL_INTEGER_FUNCTIONS) && in st_init_extensions()
1263 screen->get_param(screen, PIPE_CAP_INTEGER_MULTIPLY_32X16)) { in st_init_extensions()
1268 if (screen->get_shader_param(screen, PIPE_SHADER_VERTEX, in st_init_extensions()
1270 screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, in st_init_extensions()
1285 consts->GLSLZeroInit = screen->get_param(screen, PIPE_CAP_GLSL_ZERO_INIT); in st_init_extensions()
1300 if (screen->get_shader_param(screen, PIPE_SHADER_TESS_CTRL, in st_init_extensions()
1308 screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY, in st_init_extensions()
1352 get_max_samples_for_formats(screen, ARRAY_SIZE(color_formats), in st_init_extensions()
1357 get_max_samples_for_formats(screen, ARRAY_SIZE(color_formats), in st_init_extensions()
1362 get_max_samples_for_formats(screen, ARRAY_SIZE(color_formats), in st_init_extensions()
1367 get_max_samples_for_formats(screen, ARRAY_SIZE(depth_formats), in st_init_extensions()
1372 get_max_samples_for_formats(screen, ARRAY_SIZE(int_formats), in st_init_extensions()
1378 get_max_samples_for_formats(screen, ARRAY_SIZE(void_formats), in st_init_extensions()
1386 get_max_samples_for_formats_advanced(screen, in st_init_extensions()
1412 if (screen->is_format_supported(screen, PIPE_FORMAT_Z32_FLOAT, in st_init_extensions()
1428 if (screen->is_format_supported(screen, in st_init_extensions()
1457 screen->get_param(screen, PIPE_CAP_FAKE_SW_MSAA)) { in st_init_extensions()
1469 if (screen->get_param(screen, PIPE_CAP_QUERY_TIME_ELAPSED) || in st_init_extensions()
1497 screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT); in st_init_extensions()
1501 screen->get_param(screen, PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY)) in st_init_extensions()
1506 _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE), in st_init_extensions()
1509 screen->get_param(screen, PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT); in st_init_extensions()
1514 init_format_extensions(screen, extensions, tbo_rgb32, in st_init_extensions()
1526 screen->get_param(screen, PIPE_CAP_DEST_SURFACE_SRGB_CONTROL) && in st_init_extensions()
1534 if (screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, in st_init_extensions()
1543 if (!screen->get_param(screen, PIPE_CAP_PACKED_STREAM_OUTPUT)) in st_init_extensions()
1546 unsigned max_fb_fetch_rts = screen->get_param(screen, PIPE_CAP_FBFETCH); in st_init_extensions()
1548 screen->get_param(screen, PIPE_CAP_FBFETCH_COHERENT); in st_init_extensions()
1550 if (screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_ADVANCED)) in st_init_extensions()
1558 screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS)) { in st_init_extensions()
1564 consts->MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS); in st_init_extensions()
1581 screen->get_param(screen, PIPE_CAP_TGSI_TES_LAYER_VIEWPORT)) in st_init_extensions()
1585 if (screen->get_param(screen, PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT) && in st_init_extensions()
1598 screen->get_shader_param(screen, PIPE_SHADER_VERTEX, in st_init_extensions()
1601 screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_UNORM, in st_init_extensions()
1604 screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SRGB, in st_init_extensions()
1607 screen->is_format_supported(screen, PIPE_FORMAT_R16_UNORM, in st_init_extensions()
1610 screen->is_format_supported(screen, PIPE_FORMAT_R16G16_UNORM, in st_init_extensions()
1613 screen->is_format_supported(screen, PIPE_FORMAT_R16_SNORM, in st_init_extensions()
1616 screen->is_format_supported(screen, PIPE_FORMAT_R16G16_SNORM, in st_init_extensions()
1623 if (screen->get_video_param && in st_init_extensions()
1624 screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN, in st_init_extensions()
1631 if (screen->get_param(screen, PIPE_CAP_DOUBLES)) { in st_init_extensions()
1637 screen->get_param(screen, PIPE_CAP_STRING_MARKER)) in st_init_extensions()
1640 if (screen->get_param(screen, PIPE_CAP_COMPUTE)) { in st_init_extensions()
1642 screen->get_shader_param(screen, PIPE_SHADER_COMPUTE, in st_init_extensions()
1652 screen->get_compute_param(screen, ir, in st_init_extensions()
1654 screen->get_compute_param(screen, ir, in st_init_extensions()
1656 screen->get_compute_param(screen, ir, in st_init_extensions()
1659 screen->get_compute_param(screen, ir, in st_init_extensions()
1679 screen->get_compute_param(screen, ir, in st_init_extensions()
1705 screen->get_paramf(screen, PIPE_CAPF_MAX_TEXTURE_ANISOTROPY) >= 16.0) in st_init_extensions()
1785 if (screen->get_param(screen, PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES) && in st_init_extensions()
1786 screen->get_param(screen, PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES) && in st_init_extensions()
1787 screen->get_param(screen, PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE)) { in st_init_extensions()
1791 max_dilate = screen->get_paramf(screen, PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE); in st_init_extensions()
1794 screen->get_param(screen, PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES); in st_init_extensions()
1796 screen->get_param(screen, PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES); in st_init_extensions()
1799 screen->get_param(screen, PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS) > 1; in st_init_extensions()
1835 screen->get_param(screen, PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS); in st_init_extensions()
1845 screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_PREFERRED_IR); in st_init_extensions()
1850 screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_INTEGERS) && in st_init_extensions()
1852 screen->get_param(screen, PIPE_CAP_DOUBLES) && in st_init_extensions()