Lines Matching refs:texObj

153    struct gl_texture_object *texObj;
155 texObj = _mesa_lookup_texture_err(ctx, texture, name);
156 if (!texObj)
159 if (!is_texparameteri_target_valid(texObj->Target)) {
164 return texObj;
226 incomplete(struct gl_context *ctx, struct gl_texture_object *texObj)
229 _mesa_dirty_texobj(ctx, texObj);
259 struct gl_texture_object *texObj,
264 if (texObj->HandleAllocated) {
279 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
282 if (texObj->Sampler.Attrib.MinFilter == params[0])
288 texObj->Sampler.Attrib.MinFilter = params[0];
289 texObj->Sampler.Attrib.state.min_img_filter = filter_to_gallium(params[0]);
290 texObj->Sampler.Attrib.state.min_mip_filter = mipfilter_to_gallium(params[0]);
291 _mesa_lower_gl_clamp(ctx, &texObj->Sampler);
297 if (texObj->Target != GL_TEXTURE_RECTANGLE_NV &&
298 texObj->Target != GL_TEXTURE_EXTERNAL_OES) {
300 texObj->Sampler.Attrib.MinFilter = params[0];
301 texObj->Sampler.Attrib.state.min_img_filter = filter_to_gallium(params[0]);
302 texObj->Sampler.Attrib.state.min_mip_filter = mipfilter_to_gallium(params[0]);
303 _mesa_lower_gl_clamp(ctx, &texObj->Sampler);
313 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
316 if (texObj->Sampler.Attrib.MagFilter == params[0])
322 texObj->Sampler.Attrib.MagFilter = params[0];
323 texObj->Sampler.Attrib.state.mag_img_filter = filter_to_gallium(params[0]);
324 _mesa_lower_gl_clamp(ctx, &texObj->Sampler);
332 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
335 if (texObj->Sampler.Attrib.WrapS == params[0])
337 if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
339 if (is_wrap_gl_clamp(texObj->Sampler.Attrib.WrapS) != is_wrap_gl_clamp(params[0]))
341 texObj->Sampler.Attrib.WrapS = params[0];
342 texObj->Sampler.Attrib.state.wrap_s = wrap_to_gallium(params[0]);
343 _mesa_lower_gl_clamp(ctx, &texObj->Sampler);
349 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
352 if (texObj->Sampler.Attrib.WrapT == params[0])
354 if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
356 if (is_wrap_gl_clamp(texObj->Sampler.Attrib.WrapT) != is_wrap_gl_clamp(params[0]))
358 texObj->Sampler.Attrib.WrapT = params[0];
359 texObj->Sampler.Attrib.state.wrap_t = wrap_to_gallium(params[0]);
360 _mesa_lower_gl_clamp(ctx, &texObj->Sampler);
366 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
369 if (texObj->Sampler.Attrib.WrapR == params[0])
371 if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
373 if (is_wrap_gl_clamp(texObj->Sampler.Attrib.WrapR) != is_wrap_gl_clamp(params[0]))
375 texObj->Sampler.Attrib.WrapR = params[0];
376 texObj->Sampler.Attrib.state.wrap_r = wrap_to_gallium(params[0]);
377 _mesa_lower_gl_clamp(ctx, &texObj->Sampler);
386 if (texObj->Attrib.BaseLevel == params[0])
406 if ((texObj->Target == GL_TEXTURE_2D_MULTISAMPLE ||
407 texObj->Target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY ||
408 texObj->Target == GL_TEXTURE_RECTANGLE) && params[0] != 0)
416 incomplete(ctx, texObj);
419 if (texObj->Immutable)
420 texObj->Attrib.BaseLevel = MIN2(texObj->Attrib.ImmutableLevels - 1, params[0]);
422 texObj->Attrib.BaseLevel = params[0];
427 if (texObj->Attrib.MaxLevel == params[0])
431 (texObj->Target == GL_TEXTURE_RECTANGLE_ARB && params[0] > 0)) {
437 incomplete(ctx, texObj);
445 if (texObj->Immutable)
446 texObj->Attrib.MaxLevel = CLAMP(params[0], texObj->Attrib.BaseLevel,
447 texObj->Attrib.ImmutableLevels - 1);
449 texObj->Attrib.MaxLevel = params[0];
457 if (params[0] && texObj->Target == GL_TEXTURE_EXTERNAL_OES)
459 if (texObj->Attrib.GenerateMipmap != params[0]) {
461 texObj->Attrib.GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
470 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
473 if (texObj->Sampler.Attrib.CompareMode == params[0])
478 texObj->Sampler.Attrib.CompareMode = params[0];
489 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
492 if (texObj->Sampler.Attrib.CompareFunc == params[0])
504 texObj->Sampler.Attrib.CompareFunc = params[0];
505 texObj->Sampler.Attrib.state.compare_func = func_to_gallium(params[0]);
518 if (texObj->Attrib.DepthMode == params[0])
525 texObj->Attrib.DepthMode = params[0];
538 if (texObj->StencilSampling == stencil)
543 texObj->StencilSampling = stencil;
552 texObj->CropRect[0] = params[0];
553 texObj->CropRect[1] = params[1];
554 texObj->CropRect[2] = params[2];
555 texObj->CropRect[3] = params[3];
574 texObj->Attrib.Swizzle[comp] = params[0];
575 set_swizzle_component(&texObj->Attrib._Swizzle, comp, swz);
588 texObj->Attrib.Swizzle[comp] = params[comp];
589 set_swizzle_component(&texObj->Attrib._Swizzle, comp, swz);
606 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
610 if (texObj->Sampler.Attrib.sRGBDecode != decode) {
612 texObj->Sampler.Attrib.sRGBDecode = decode;
624 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
628 if (texObj->Sampler.Attrib.ReductionMode != mode) {
630 texObj->Sampler.Attrib.ReductionMode = mode;
631 texObj->Sampler.Attrib.state.reduction_mode = reduction_to_gallium(mode);
643 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
649 if (param != texObj->Sampler.Attrib.CubeMapSeamless) {
651 texObj->Sampler.Attrib.CubeMapSeamless = param;
652 texObj->Sampler.Attrib.state.seamless_cube_map = param;
659 if (ctx->Extensions.EXT_memory_object && !texObj->Immutable) {
660 texObj->TextureTiling = params[0];
702 struct gl_texture_object *texObj,
707 if (texObj->HandleAllocated) {
725 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
728 if (texObj->Sampler.Attrib.MinLod == params[0])
731 texObj->Sampler.Attrib.MinLod = params[0];
732 texObj->Sampler.Attrib.state.min_lod = MAX2(params[0], 0.0f); /* only positive vals */
739 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
742 if (texObj->Sampler.Attrib.MaxLod == params[0])
745 texObj->Sampler.Attrib.MaxLod = params[0];
746 texObj->Sampler.Attrib.state.max_lod = params[0];
754 texObj->Attrib.Priority = CLAMP(params[0], 0.0F, 1.0F);
759 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
762 if (texObj->Sampler.Attrib.MaxAnisotropy == params[0])
771 texObj->Sampler.Attrib.MaxAnisotropy = MIN2(params[0],
773 texObj->Sampler.Attrib.state.max_anisotropy =
774 texObj->Sampler.Attrib.MaxAnisotropy == 1 ?
775 0 : texObj->Sampler.Attrib.MaxAnisotropy; /* gallium sets 0 for 1 */
790 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
793 if (texObj->Sampler.Attrib.LodBias != params[0]) {
795 texObj->Sampler.Attrib.LodBias = params[0];
796 texObj->Sampler.Attrib.state.lod_bias = util_quantize_lod_bias(params[0]);
814 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
820 memcpy(texObj->Sampler.Attrib.state.border_color.f, params, 4 * sizeof(float));
822 texObj->Sampler.Attrib.state.border_color.f[RCOMP] = CLAMP(params[0], 0.0F, 1.0F);
823 texObj->Sampler.Attrib.state.border_color.f[GCOMP] = CLAMP(params[1], 0.0F, 1.0F);
824 texObj->Sampler.Attrib.state.border_color.f[BCOMP] = CLAMP(params[2], 0.0F, 1.0F);
825 texObj->Sampler.Attrib.state.border_color.f[ACOMP] = CLAMP(params[3], 0.0F, 1.0F);
827 _mesa_update_is_border_color_nonzero(&texObj->Sampler);
832 texObj->TextureTiling = params[0];
862 struct gl_texture_object *texObj,
894 need_update = set_tex_parameteri(ctx, texObj, pname, p, dsa);
908 need_update = set_tex_parameterf(ctx, texObj, pname, p, dsa);
913 ctx->Driver.TexParameter(ctx, texObj, pname);
920 struct gl_texture_object *texObj,
945 need_update = set_tex_parameteri(ctx, texObj, pname, p, dsa);
956 need_update = set_tex_parameteri(ctx, texObj, pname, iparams, dsa);
972 need_update = set_tex_parameteri(ctx, texObj, pname, p, dsa);
977 need_update = set_tex_parameterf(ctx, texObj, pname, params, dsa);
981 ctx->Driver.TexParameter(ctx, texObj, pname);
988 struct gl_texture_object *texObj,
1003 need_update = set_tex_parameterf(ctx, texObj, pname, fparam, dsa);
1020 need_update = set_tex_parameteri(ctx, texObj, pname, iparam, dsa);
1025 ctx->Driver.TexParameter(ctx, texObj, pname);
1032 struct gl_texture_object *texObj,
1046 need_update = set_tex_parameterf(ctx, texObj, pname, fparams, dsa);
1059 need_update = set_tex_parameterf(ctx, texObj, pname, fparams, dsa);
1064 need_update = set_tex_parameteri(ctx, texObj, pname, params, dsa);
1068 ctx->Driver.TexParameter(ctx, texObj, pname);
1074 struct gl_texture_object *texObj,
1079 if (texObj->HandleAllocated) {
1085 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) {
1091 COPY_4V(texObj->Sampler.Attrib.state.border_color.i, params);
1092 _mesa_update_is_border_color_nonzero(&texObj->Sampler);
1095 _mesa_texture_parameteriv(ctx, texObj, pname, params, dsa);
1103 struct gl_texture_object *texObj,
1108 if (texObj->HandleAllocated) {
1114 if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) {
1120 COPY_4V(texObj->Sampler.Attrib.state.border_color.ui, params);
1121 _mesa_update_is_border_color_nonzero(&texObj->Sampler);
1124 _mesa_texture_parameteriv(ctx, texObj, pname, (const GLint *) params,
1134 struct gl_texture_object *texObj;
1137 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1141 if (!texObj)
1144 _mesa_texture_parameterf(ctx, texObj, pname, param, false);
1150 struct gl_texture_object *texObj;
1153 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1157 if (!texObj)
1160 _mesa_texture_parameterfv(ctx, texObj, pname, params, false);
1166 struct gl_texture_object *texObj;
1169 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1173 if (!texObj)
1176 _mesa_texture_parameteri(ctx, texObj, pname, param, false);
1182 struct gl_texture_object *texObj;
1185 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1189 if (!texObj)
1192 _mesa_texture_parameteriv(ctx, texObj, pname, params, false);
1203 struct gl_texture_object *texObj;
1206 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1210 if (!texObj)
1213 _mesa_texture_parameterIiv(ctx, texObj, pname, params, false);
1224 struct gl_texture_object *texObj;
1227 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1231 if (!texObj)
1234 _mesa_texture_parameterIuiv(ctx, texObj, pname, params, false);
1240 struct gl_texture_object *texObj;
1243 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
1245 if (!texObj)
1248 if (!is_texparameteri_target_valid(texObj->Target)) {
1253 _mesa_texture_parameterfv(ctx, texObj, pname, params, true);
1259 struct gl_texture_object *texObj;
1262 texObj = get_texobj_by_name(ctx, texture, "glTextureParameterfv");
1263 if (!texObj)
1266 _mesa_texture_parameterfv(ctx, texObj, pname, params, true);
1272 struct gl_texture_object *texObj;
1275 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1279 if (!texObj)
1282 if (!is_texparameteri_target_valid(texObj->Target)) {
1287 _mesa_texture_parameterfv(ctx, texObj, pname, params, true);
1293 struct gl_texture_object *texObj;
1296 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
1298 if (!texObj)
1301 if (!is_texparameteri_target_valid(texObj->Target)) {
1306 _mesa_texture_parameterf(ctx, texObj, pname, param, true);
1313 struct gl_texture_object *texObj;
1316 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1320 if (!texObj)
1323 if (!is_texparameteri_target_valid(texObj->Target)) {
1328 _mesa_texture_parameterf(ctx, texObj, pname, param, true);
1334 struct gl_texture_object *texObj;
1337 texObj = get_texobj_by_name(ctx, texture, "glTextureParameterf");
1338 if (!texObj)
1341 _mesa_texture_parameterf(ctx, texObj, pname, param, true);
1347 struct gl_texture_object *texObj;
1350 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
1352 if (!texObj)
1355 if (!is_texparameteri_target_valid(texObj->Target)) {
1360 _mesa_texture_parameteri(ctx, texObj, pname, param, true);
1367 struct gl_texture_object *texObj;
1370 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1374 if (!texObj)
1377 if (!is_texparameteri_target_valid(texObj->Target)) {
1382 _mesa_texture_parameteri(ctx, texObj, pname, param, true);
1388 struct gl_texture_object *texObj;
1391 texObj = get_texobj_by_name(ctx, texture, "glTextureParameteri");
1392 if (!texObj)
1395 _mesa_texture_parameteri(ctx, texObj, pname, param, true);
1402 struct gl_texture_object *texObj;
1405 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
1407 if (!texObj)
1410 if (!is_texparameteri_target_valid(texObj->Target)) {
1415 _mesa_texture_parameteriv(ctx, texObj, pname, params, true);
1422 struct gl_texture_object *texObj;
1425 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1429 if (!texObj)
1432 if (!is_texparameteri_target_valid(texObj->Target)) {
1437 _mesa_texture_parameteriv(ctx, texObj, pname, params, true);
1444 struct gl_texture_object *texObj;
1447 texObj = get_texobj_by_name(ctx, texture, "glTextureParameteriv");
1448 if (!texObj)
1451 _mesa_texture_parameteriv(ctx, texObj, pname, params, true);
1458 struct gl_texture_object *texObj;
1461 texObj = get_texobj_by_name(ctx, texture, "glTextureParameterIiv");
1462 if (!texObj)
1465 _mesa_texture_parameterIiv(ctx, texObj, pname, params, true);
1472 struct gl_texture_object *texObj;
1475 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
1477 if (!texObj)
1480 _mesa_texture_parameterIiv(ctx, texObj, pname, params, true);
1487 struct gl_texture_object *texObj;
1490 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1494 if (!texObj)
1497 _mesa_texture_parameterIiv(ctx, texObj, pname, params, true);
1503 struct gl_texture_object *texObj;
1506 texObj = get_texobj_by_name(ctx, texture, "glTextureParameterIuiv");
1507 if (!texObj)
1510 _mesa_texture_parameterIuiv(ctx, texObj, pname, params, true);
1517 struct gl_texture_object *texObj;
1520 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
1522 if (!texObj)
1525 _mesa_texture_parameterIuiv(ctx, texObj, pname, params, true);
1532 struct gl_texture_object *texObj;
1535 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
1539 if (!texObj)
1542 _mesa_texture_parameterIuiv(ctx, texObj, pname, params, true);
1632 const struct gl_texture_object *texObj,
1642 img = _mesa_select_tex_image(texObj, target, level);
1838 const struct gl_texture_object *texObj,
1841 const struct gl_buffer_object *bo = texObj->BufferObject;
1842 mesa_format texFormat = texObj->_BufferObjectFormat;
1844 GLenum internalFormat = texObj->BufferObjectFormat;
1848 assert(texObj->Target == GL_TEXTURE_BUFFER);
1871 *params = ((texObj->BufferSize == -1) ? bo->Size : texObj->BufferSize)
1919 *params = texObj->BufferOffset;
1924 *params = (texObj->BufferSize == -1) ? bo->Size : texObj->BufferSize;
1997 struct gl_texture_object *texObj,
2024 get_tex_level_parameter_buffer(ctx, texObj, pname, params, dsa);
2027 get_tex_level_parameter_image(ctx, texObj, target,
2036 struct gl_texture_object *texObj;
2043 texObj = _mesa_get_current_tex_object(ctx, target);
2044 if (!texObj)
2047 get_tex_level_parameteriv(ctx, texObj, target, level,
2057 struct gl_texture_object *texObj;
2063 texObj = _mesa_get_current_tex_object(ctx, target);
2064 if (!texObj)
2067 get_tex_level_parameteriv(ctx, texObj, target, level,
2075 struct gl_texture_object *texObj;
2079 texObj = _mesa_lookup_texture_err(ctx, texture,
2081 if (!texObj)
2084 if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
2087 get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
2097 struct gl_texture_object *texObj;
2101 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
2103 if (!texObj)
2106 if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
2109 get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
2119 struct gl_texture_object *texObj;
2123 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2127 if (!texObj)
2130 if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
2133 get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
2143 struct gl_texture_object *texObj;
2146 texObj = _mesa_lookup_texture_err(ctx, texture,
2148 if (!texObj)
2151 if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
2154 get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
2162 struct gl_texture_object *texObj;
2165 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
2167 if (!texObj)
2170 if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
2173 get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
2181 struct gl_texture_object *texObj;
2184 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2188 if (!texObj)
2191 if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true))
2194 get_tex_level_parameteriv(ctx, texObj, texObj->Target, level,
2770 struct gl_texture_object *texObj;
2773 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2777 if (!texObj)
2780 get_tex_parameterIiv(ctx, texObj, pname, params, false);
2788 struct gl_texture_object *texObj;
2791 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2795 if (!texObj)
2798 get_tex_parameterIiv(ctx, texObj, pname, (GLint *) params, false);
2804 struct gl_texture_object *texObj;
2807 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
2809 if (!texObj)
2812 if (!is_texparameteri_target_valid(texObj->Target)) {
2817 get_tex_parameterfv(ctx, texObj, pname, params, true);
2823 struct gl_texture_object *texObj;
2826 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2830 if (!texObj)
2833 if (!is_texparameteri_target_valid(texObj->Target)) {
2837 get_tex_parameterfv(ctx, texObj, pname, params, true);
2856 struct gl_texture_object *texObj;
2859 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
2861 if (!texObj)
2864 if (!is_texparameteri_target_valid(texObj->Target)) {
2868 get_tex_parameteriv(ctx, texObj, pname, params, true);
2874 struct gl_texture_object *texObj;
2877 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2881 if (!texObj)
2884 if (!is_texparameteri_target_valid(texObj->Target)) {
2888 get_tex_parameteriv(ctx, texObj, pname, params, true);
2907 struct gl_texture_object *texObj;
2910 texObj = get_texobj_by_name(ctx, texture, "glGetTextureParameterIiv");
2911 if (!texObj)
2914 get_tex_parameterIiv(ctx, texObj, pname, params, true);
2920 struct gl_texture_object *texObj;
2923 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
2925 if (!texObj)
2929 get_tex_parameterIiv(ctx, texObj, pname, params, true);
2936 struct gl_texture_object *texObj;
2939 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2943 if (!texObj)
2946 get_tex_parameterIiv(ctx, texObj, pname, params, true);
2952 struct gl_texture_object *texObj;
2955 texObj = get_texobj_by_name(ctx, texture, "glGetTextureParameterIuiv");
2956 if (!texObj)
2959 get_tex_parameterIiv(ctx, texObj, pname, (GLint *) params, true);
2966 struct gl_texture_object *texObj;
2969 texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
2971 if (!texObj)
2974 get_tex_parameterIiv(ctx, texObj, pname, (GLint *) params, true);
2981 struct gl_texture_object *texObj;
2984 texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
2988 if (!texObj)
2991 get_tex_parameterIiv(ctx, texObj, pname, (GLint *) params, true);