X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fmtypes.h;h=91fc71cfcfdbf9993692912903f3ebc536eb7826;hp=abe91699a81f00482688429c978fe10d5f8cdcb5;hb=00746fa2dab0b55b113e3543420b79f01f91e5c1;hpb=7af047c3732c2a701b010b79fd8dae35c5f17268 diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index abe91699a81..91fc71cfcfd 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -77,6 +77,7 @@ struct prog_instruction; struct gl_program_parameter_list; struct gl_shader_spirv_data; struct set; +struct shader_includes; struct vbo_context; /*@}*/ @@ -159,19 +160,14 @@ _mesa_varying_slot_in_fs(gl_varying_slot slot) */ struct gl_config { - GLboolean rgbMode; GLboolean floatMode; GLuint doubleBufferMode; GLuint stereoMode; - GLboolean haveAccumBuffer; - GLboolean haveDepthBuffer; - GLboolean haveStencilBuffer; - GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ GLuint redMask, greenMask, blueMask, alphaMask; + GLint redShift, greenShift, blueShift, alphaShift; GLint rgbBits; /* total bits for rgb */ - GLint indexBits; /* total bits for colorindex */ GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; GLint depthBits; @@ -463,6 +459,7 @@ struct gl_vertex_format { GLenum16 Type; /**< datatype: GL_FLOAT, GL_INT, etc */ GLenum16 Format; /**< default: GL_RGBA, but may be GL_BGRA */ + enum pipe_format _PipeFormat:16; /**< pipe_format for Gallium */ GLubyte Size:5; /**< components per element (1,2,3,4) */ GLubyte Normalized:1; /**< GL_ARB_vertex_program */ GLubyte Integer:1; /**< Integer-valued? */ @@ -1550,6 +1547,9 @@ struct gl_vertex_array_object /** Mask indicating which vertex arrays have vertex buffer associated. */ GLbitfield VertexAttribBufferMask; + /** Mask indicating which vertex arrays have a non-zero instance divisor. */ + GLbitfield NonZeroDivisorMask; + /** Mask of VERT_BIT_* values indicating which arrays are enabled */ GLbitfield Enabled; @@ -1562,6 +1562,9 @@ struct gl_vertex_array_object */ GLbitfield _EffEnabledVBO; + /** Same as _EffEnabledVBO, but for instance divisors. */ + GLbitfield _EffEnabledNonZeroDivisor; + /** Denotes the way the position/generic0 attribute is mapped */ gl_attribute_map_mode _AttributeMapMode; @@ -2921,6 +2924,9 @@ struct gl_shader_program_data */ union gl_constant_value *UniformDataDefaults; + /** Hash for quick search by name. */ + struct hash_table_u64 *ProgramResourceHash; + GLboolean Validated; /** List of all active resources after linking. */ @@ -2956,8 +2962,13 @@ struct gl_shader_program /** * Is the application intending to glGetProgramBinary this program? + * + * BinaryRetrievableHint is the currently active hint that gets set + * during initialization and after linking and BinaryRetrievableHintPending + * is the hint set by the user to be active when program is linked next time. */ - GLboolean BinaryRetreivableHint; + GLboolean BinaryRetrievableHint; + GLboolean BinaryRetrievableHintPending; /** * Indicates whether program can be bound for individual pipeline stages @@ -3193,6 +3204,9 @@ struct gl_shader_compiler_options /** Clamp UBO and SSBO block indices so they don't go out-of-bounds. */ GLboolean ClampBlockIndicesToArrayBounds; + /** (driconf) Force gl_Position to be considered invariant */ + GLboolean PositionAlwaysInvariant; + const struct nir_shader_compiler_options *NirOptions; }; @@ -3322,6 +3336,13 @@ struct gl_shared_state struct hash_table_u64 *ImageHandles; mtx_t HandlesMutex; /**< For texture/image handles safety */ + /* GL_ARB_shading_language_include */ + struct shader_includes *ShaderIncludes; + /* glCompileShaderInclude expects ShaderIncludes not to change while it is + * in progress. + */ + mtx_t ShaderIncludeMutex; + /** * Some context in this share group was affected by a GPU reset * @@ -3649,7 +3670,7 @@ struct gl_program_constants struct gl_constants { GLuint MaxTextureMbytes; /**< Max memory per image, in MB */ - GLuint MaxTextureLevels; /**< Max mipmap levels. */ + GLuint MaxTextureSize; /**< Max 1D/2D texture size, in pixels*/ GLuint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */ GLuint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */ GLuint MaxArrayTextureLayers; /**< Max layers in array textures */ @@ -3907,8 +3928,12 @@ struct gl_constants */ GLboolean GLSLSkipStrictMaxUniformLimitCheck; - /** Whether gl_FragCoord and gl_FrontFacing are system values. */ + /** + * Whether gl_FragCoord, gl_PointCoord and gl_FrontFacing + * are system values. + **/ bool GLSLFragCoordIsSysVal; + bool GLSLPointCoordIsSysVal; bool GLSLFrontFacingIsSysVal; /** @@ -3918,6 +3943,11 @@ struct gl_constants */ bool GLSLOptimizeConservatively; + /** + * Whether to call lower_const_arrays_to_uniforms() during linking. + */ + bool GLSLLowerConstArrays; + /** * True if gl_TessLevelInner/Outer[] in the TES should be inputs * (otherwise, they're system values). @@ -3944,6 +3974,15 @@ struct gl_constants */ GLboolean DisableVaryingPacking; + /** + * Disable varying packing if used for transform feedback. This is needed + * for some drivers (e.g. Panfrost) where transform feedback requires + * unpacked varyings. + * + * This variable is mutually exlusive with DisableVaryingPacking. + */ + GLboolean DisableTransformFeedbackPacking; + /** * UBOs and SSBOs can be packed tightly by the OpenGL implementation when * layout is set as shared (the default) or packed. However most Mesa drivers @@ -4121,8 +4160,22 @@ struct gl_constants /** Is the drivers uniform storage packed or padded to 16 bytes. */ bool PackedDriverUniformStorage; + /** Does the driver make use of the NIR based GLSL linker */ + bool UseNIRGLSLLinker; + + /** Wether or not glBitmap uses red textures rather than alpha */ + bool BitmapUsesRed; + + /** Whether the vertex buffer offset is a signed 32-bit integer. */ + bool VertexBufferOffsetIsInt32; + /** GL_ARB_gl_spirv */ struct spirv_supported_capabilities SpirVCapabilities; + + /** GL_ARB_spirv_extensions */ + struct spirv_supported_extensions *SpirVExtensions; + + char *VendorOverride; }; @@ -4215,6 +4268,7 @@ struct gl_extensions GLboolean ARB_shadow; GLboolean ARB_sparse_buffer; GLboolean ARB_stencil_texturing; + GLboolean ARB_spirv_extensions; GLboolean ARB_sync; GLboolean ARB_tessellation_shader; GLboolean ARB_texture_border_clamp; @@ -4256,9 +4310,11 @@ struct gl_extensions GLboolean EXT_blend_equation_separate; GLboolean EXT_blend_func_separate; GLboolean EXT_blend_minmax; + GLboolean EXT_demote_to_helper_invocation; GLboolean EXT_depth_bounds_test; GLboolean EXT_disjoint_timer_query; GLboolean EXT_draw_buffers2; + GLboolean EXT_EGL_image_storage; GLboolean EXT_float_blend; GLboolean EXT_framebuffer_multisample; GLboolean EXT_framebuffer_multisample_blit_scaled; @@ -4276,6 +4332,7 @@ struct gl_extensions GLboolean EXT_semaphore; GLboolean EXT_semaphore_fd; GLboolean EXT_shader_image_load_formatted; + GLboolean EXT_shader_image_load_store; GLboolean EXT_shader_integer_mix; GLboolean EXT_shader_samples_identical; GLboolean EXT_sRGB; @@ -4289,6 +4346,8 @@ struct gl_extensions GLboolean EXT_texture_filter_anisotropic; GLboolean EXT_texture_integer; GLboolean EXT_texture_mirror_clamp; + GLboolean EXT_texture_norm16; + GLboolean EXT_texture_shadow_lod; GLboolean EXT_texture_shared_exponent; GLboolean EXT_texture_snorm; GLboolean EXT_texture_sRGB; @@ -4325,9 +4384,11 @@ struct gl_extensions GLboolean ATI_texture_env_combine3; GLboolean ATI_fragment_shader; GLboolean GREMEDY_string_marker; + GLboolean INTEL_blackhole_render; GLboolean INTEL_conservative_rasterization; GLboolean INTEL_performance_query; GLboolean INTEL_shader_atomic_float_minmax; + GLboolean INTEL_shader_integer_functions2; GLboolean KHR_blend_equation_advanced; GLboolean KHR_blend_equation_advanced_coherent; GLboolean KHR_robustness; @@ -4343,6 +4404,7 @@ struct gl_extensions GLboolean MESA_ycbcr_texture; GLboolean NV_compute_shader_derivatives; GLboolean NV_conditional_render; + GLboolean NV_copy_image; GLboolean NV_fill_rectangle; GLboolean NV_fog_distance; GLboolean NV_point_sprite; @@ -4444,7 +4506,7 @@ struct gl_matrix_stack #define _NEW_TRANSFORM (1u << 17) /**< gl_context::Transform */ #define _NEW_VIEWPORT (1u << 18) /**< gl_context::Viewport */ #define _NEW_TEXTURE_STATE (1u << 19) /**< gl_context::Texture (states only) */ -#define _NEW_ARRAY (1u << 20) /**< gl_context::Array */ +/* gap */ #define _NEW_RENDERMODE (1u << 21) /**< gl_context::RenderMode, etc */ #define _NEW_BUFFERS (1u << 22) /**< gl_context::Visual, DrawBuffer, */ #define _NEW_CURRENT_ATTRIB (1u << 23) /**< gl_context::Current */ @@ -4965,6 +5027,11 @@ struct gl_context */ struct gl_pipeline_object *_Shader; + /** + * NIR containing the functions that implement software fp64 support. + */ + struct nir_shader *SoftFP64; + struct gl_query_state Query; /**< occlusion, timer queries */ struct gl_transform_feedback_state TransformFeedback; @@ -5095,6 +5162,8 @@ struct gl_context GLfloat ConservativeRasterDilate; GLenum16 ConservativeRasterMode; + GLboolean IntelBlackholeRender; /**< GL_INTEL_blackhole_render */ + /** Does glVertexAttrib(0) alias glVertex()? */ bool _AttribZeroAliasesVertex; @@ -5152,6 +5221,8 @@ struct gl_context struct hash_table_u64 *ResidentTextureHandles; struct hash_table_u64 *ResidentImageHandles; /*@}*/ + + bool shader_builtin_ref; }; /** @@ -5167,7 +5238,7 @@ struct gl_memory_info unsigned nr_device_memory_evictions; /**< # of evictions (monotonic counter) */ }; -#ifdef DEBUG +#ifndef NDEBUG extern int MESA_VERBOSE; extern int MESA_DEBUG_FLAGS; #else