Lines Matching refs:index

1564  * We hash the enum value to get an index into the 'table' array,
1565 * which holds the index in the 'values' array of struct value_desc.
1594 /* We index into the table_set[] list of per-API hash tables using the API's
1613 /* If the enum isn't valid, the hash walk ends with index 0,
1644 unsigned index = ctx->Texture.CurrentUnit;
1645 *p = ((char *)&ctx->Texture.FixedFuncUnit[index] + d->offset);
2455 * into the corresponding Mesa texture target index.
2501 find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
2509 if (index >= ctx->Const.MaxDrawBuffers)
2513 v->value_int = (ctx->Color.BlendEnabled >> index) & 1;
2519 if (index >= ctx->Const.MaxDrawBuffers)
2523 v->value_int = ctx->Color.Blend[index].SrcRGB;
2526 if (index >= ctx->Const.MaxDrawBuffers)
2530 v->value_int = ctx->Color.Blend[index].SrcA;
2535 if (index >= ctx->Const.MaxDrawBuffers)
2539 v->value_int = ctx->Color.Blend[index].DstRGB;
2542 if (index >= ctx->Const.MaxDrawBuffers)
2546 v->value_int = ctx->Color.Blend[index].DstA;
2549 if (index >= ctx->Const.MaxDrawBuffers)
2553 v->value_int = ctx->Color.Blend[index].EquationRGB;
2556 if (index >= ctx->Const.MaxDrawBuffers)
2560 v->value_int = ctx->Color.Blend[index].EquationA;
2564 if (index >= ctx->Const.MaxDrawBuffers)
2568 v->value_int_4[0] = GET_COLORMASK_BIT(ctx->Color.ColorMask, index, 0);
2569 v->value_int_4[1] = GET_COLORMASK_BIT(ctx->Color.ColorMask, index, 1);
2570 v->value_int_4[2] = GET_COLORMASK_BIT(ctx->Color.ColorMask, index, 2);
2571 v->value_int_4[3] = GET_COLORMASK_BIT(ctx->Color.ColorMask, index, 3);
2575 if (index >= ctx->Const.MaxViewports)
2577 v->value_int_4[0] = ctx->Scissor.ScissorArray[index].X;
2578 v->value_int_4[1] = ctx->Scissor.ScissorArray[index].Y;
2579 v->value_int_4[2] = ctx->Scissor.ScissorArray[index].Width;
2580 v->value_int_4[3] = ctx->Scissor.ScissorArray[index].Height;
2586 if (index >= ctx->Const.MaxWindowRectangles)
2588 v->value_int_4[0] = ctx->Scissor.WindowRects[index].X;
2589 v->value_int_4[1] = ctx->Scissor.WindowRects[index].Y;
2590 v->value_int_4[2] = ctx->Scissor.WindowRects[index].Width;
2591 v->value_int_4[3] = ctx->Scissor.WindowRects[index].Height;
2595 if (index >= ctx->Const.MaxViewports)
2597 v->value_float_4[0] = ctx->ViewportArray[index].X;
2598 v->value_float_4[1] = ctx->ViewportArray[index].Y;
2599 v->value_float_4[2] = ctx->ViewportArray[index].Width;
2600 v->value_float_4[3] = ctx->ViewportArray[index].Height;
2604 if (index >= ctx->Const.MaxViewports)
2606 v->value_double_2[0] = ctx->ViewportArray[index].Near;
2607 v->value_double_2[1] = ctx->ViewportArray[index].Far;
2611 if (index >= ctx->Const.MaxTransformFeedbackBuffers)
2615 v->value_int64 = ctx->TransformFeedback.CurrentObject->Offset[index];
2619 if (index >= ctx->Const.MaxTransformFeedbackBuffers)
2624 = ctx->TransformFeedback.CurrentObject->RequestedSize[index];
2628 if (index >= ctx->Const.MaxTransformFeedbackBuffers)
2632 v->value_int = ctx->TransformFeedback.CurrentObject->BufferNames[index];
2636 if (index >= ctx->Const.MaxUniformBufferBindings)
2640 buf = ctx->UniformBufferBindings[index].BufferObject;
2645 if (index >= ctx->Const.MaxUniformBufferBindings)
2649 v->value_int = ctx->UniformBufferBindings[index].Offset < 0 ? 0 :
2650 ctx->UniformBufferBindings[index].Offset;
2654 if (index >= ctx->Const.MaxUniformBufferBindings)
2658 v->value_int = ctx->UniformBufferBindings[index].Size < 0 ? 0 :
2659 ctx->UniformBufferBindings[index].Size;
2666 if (index >= ctx->Const.MaxShaderStorageBufferBindings)
2668 buf = ctx->ShaderStorageBufferBindings[index].BufferObject;
2675 if (index >= ctx->Const.MaxShaderStorageBufferBindings)
2677 v->value_int = ctx->ShaderStorageBufferBindings[index].Offset < 0 ? 0 :
2678 ctx->ShaderStorageBufferBindings[index].Offset;
2684 if (index >= ctx->Const.MaxShaderStorageBufferBindings)
2686 v->value_int = ctx->ShaderStorageBufferBindings[index].Size < 0 ? 0 :
2687 ctx->ShaderStorageBufferBindings[index].Size;
2692 if (index != 0)
2702 if (index >= ctx->Const.MaxAtomicBufferBindings)
2704 buf = ctx->AtomicBufferBindings[index].BufferObject;
2711 if (index >= ctx->Const.MaxAtomicBufferBindings)
2713 v->value_int64 = ctx->AtomicBufferBindings[index].Offset < 0 ? 0 :
2714 ctx->AtomicBufferBindings[index].Offset;
2720 if (index >= ctx->Const.MaxAtomicBufferBindings)
2722 v->value_int64 = ctx->AtomicBufferBindings[index].Size < 0 ? 0 :
2723 ctx->AtomicBufferBindings[index].Size;
2730 if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs)
2732 v->value_int = ctx->Array.VAO->BufferBinding[VERT_ATTRIB_GENERIC(index)].InstanceDivisor;
2738 if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs)
2740 v->value_int = ctx->Array.VAO->BufferBinding[VERT_ATTRIB_GENERIC(index)].Offset;
2746 if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs)
2748 v->value_int = ctx->Array.VAO->BufferBinding[VERT_ATTRIB_GENERIC(index)].Stride;
2754 if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs)
2756 buf = ctx->Array.VAO->BufferBinding[VERT_ATTRIB_GENERIC(index)].BufferObj;
2766 if (index >= ctx->Const.MaxImageUnits)
2769 t = ctx->ImageUnits[index].TexObj;
2777 if (index >= ctx->Const.MaxImageUnits)
2780 v->value_int = ctx->ImageUnits[index].Level;
2786 if (index >= ctx->Const.MaxImageUnits)
2789 v->value_int = ctx->ImageUnits[index].Layered;
2795 if (index >= ctx->Const.MaxImageUnits)
2798 v->value_int = ctx->ImageUnits[index].Layer;
2804 if (index >= ctx->Const.MaxImageUnits)
2807 v->value_int = ctx->ImageUnits[index].Access;
2813 if (index >= ctx->Const.MaxImageUnits)
2816 v->value_int = ctx->ImageUnits[index].Format;
2836 if (index >= _mesa_max_tex_unit(ctx))
2839 v->value_int = ctx->Texture.Unit[index].CurrentTex[target]->Name;
2848 if (index >= _mesa_max_tex_unit(ctx))
2851 samp = ctx->Texture.Unit[index].Sampler;
2859 if (index >= 3)
2861 v->value_uint = ctx->Const.MaxComputeWorkGroupCount[index];
2867 if (index >= 3)
2869 v->value_int = ctx->Const.MaxComputeWorkGroupSize[index];
2876 if (index >= 3)
2878 v->value_int = ctx->Const.MaxComputeVariableGroupSize[index];
2886 if (index >= 1)
2891 if (index >= 1)
2897 if (index >= 1)
2902 if (index >= 1)
2917 if (index >= _mesa_max_tex_unit(ctx))
2920 _mesa_ActiveTexture_no_error(GL_TEXTURE0 + index);
2927 if (index >= ctx->Const.MaxTextureCoordUnits)
2930 _mesa_ClientActiveTexture(GL_TEXTURE0 + index);
2936 if (index >= ARRAY_SIZE(ctx->TextureMatrixStack))
2938 v->value_matrix = ctx->TextureMatrixStack[index].Top;
2941 if (index >= ARRAY_SIZE(ctx->TextureMatrixStack))
2943 v->value_matrix = ctx->TextureMatrixStack[index].Top;
2949 if (index >= ctx->Const.MaxViewports)
2951 v->value_int = ctx->ViewportArray[index].SwizzleX;
2956 if (index >= ctx->Const.MaxViewports)
2958 v->value_int = ctx->ViewportArray[index].SwizzleY;
2963 if (index >= ctx->Const.MaxViewports)
2965 v->value_int = ctx->ViewportArray[index].SwizzleZ;
2970 if (index >= ctx->Const.MaxViewports)
2972 v->value_int = ctx->ViewportArray[index].SwizzleW;
2987 _mesa_GetBooleani_v( GLenum pname, GLuint index, GLboolean *params )
2991 find_value_indexed("glGetBooleani_v", pname, index, &v);
3014 _mesa_GetIntegeri_v( GLenum pname, GLuint index, GLint *params )
3018 find_value_indexed("glGetIntegeri_v", pname, index, &v);
3072 _mesa_GetInteger64i_v( GLenum pname, GLuint index, GLint64 *params )
3076 find_value_indexed("glGetInteger64i_v", pname, index, &v);
3106 _mesa_GetFloati_v(GLenum pname, GLuint index, GLfloat *params)
3112 find_value_indexed("glGetFloati_v", pname, index, &v);
3207 _mesa_GetDoublei_v(GLenum pname, GLuint index, GLdouble *params)
3213 find_value_indexed("glGetDoublei_v", pname, index, &v);
3308 _mesa_GetUnsignedBytei_vEXT(GLenum target, GLuint index, GLubyte *data)
3322 type = find_value_indexed(func, target, index, &v);