Lines Matching defs:texture
136 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture)", func);
150 * Return a pointer to the current texture object for the given target
151 * on the current texture unit.
231 * Get the texture object for given target and texunit
267 * Initialize a new texture object to default values.
268 * \param obj the texture object
269 * \param name the texture name
270 * \param target the texture target
385 * Allocate and initialize a new texture object. But don't put it into the
386 * texture object hash table.
388 * \param shared the shared GL state structure to contain the texture object
389 * \param name integer name for the texture object
394 * \return pointer to new texture object.
413 * Some texture initialization can't be finished until we know which
457 * Deallocate a texture object struct. It should have already been
458 * removed from the texture object pool.
461 * \param texObj the texture object to delete.
478 /* free the texture images */
487 /* Delete all texture/image handles. */
499 * Free all texture images of the given texture objectm, except for
503 * \param texObj texture object.
504 * \param retainTexImage a texture image that will \em not be freed.
529 * Check if the given texture object is valid by examining its Target field.
551 _mesa_problem(NULL, "invalid reference to a deleted texture object");
554 _mesa_problem(NULL, "invalid texture object Target 0x%x, Id = %u",
562 * Reference (or unreference) a texture object.
575 /* Unreference the old texture */
591 _mesa_problem(NULL, "Unable to delete texture, no context");
596 /* reference new texture */
611 * Mark a texture object as incomplete. There are actually three kinds of
613 * 1. "base incomplete": the base level of the texture is invalid so no
615 * 2. "mipmap incomplete": a non-base level of the texture is invalid so
617 * 3. "texture incompleteness": some combination of texture state and
618 * sampler state renders the texture incomplete.
620 * \param t texture object
646 * Examine a texture object to determine if it is complete.
652 * \param t texture object.
654 * According to the texture target, verifies that each of the mipmaps is
703 incomplete(t, BASE, "texture width or height or depth = 0");
707 /* Check if the texture values are integer */
713 /* Check if the texture type is Float or HalfFloatOES and ensure Min and Mag
746 /* This texture object was created with glTexStorage1/2/3D() so we
785 * Note: we don't care about the current texture sampler state here.
786 * To determine texture completeness we'll either look at _BaseComplete
899 * Check if the given cube map texture is "cube complete" as defined in
909 * Mark a texture object dirty. It forces the object to be incomplete
913 * \param texObj texture object.
926 * Return pointer to a default/fallback texture of the given type/target.
927 * The texture is an RGBA texture with all texels = (0,0,0,1).
929 * incomplete texture.
935 /* create fallback texture now */
1008 /* create texture object */
1028 /* initialize level[0] texture image */
1050 * use the same fallback texture. */
1058 * Compute the size of the given texture object, in bytes.
1106 /* plus, the default texture objects */
1116 * Return the base format for the given texture object by looking
1117 * at the base texture image.
1130 invalidate_tex_image_error_check(struct gl_context *ctx, GLuint texture,
1135 * "If <texture> is zero or is not the name of a texture, the error
1139 * spec. We have to get the texture object before we can validate the
1140 * other parameters against values in the texture object.
1142 struct gl_texture_object *const t = _mesa_lookup_texture(ctx, texture);
1143 if (texture == 0 || t == NULL) {
1144 _mesa_error(ctx, GL_INVALID_VALUE, "%s(texture)", name);
1151 * of the maximum texture width, height, or depth, the error
1161 * "If the target of <texture> is TEXTURE_RECTANGLE, TEXTURE_BUFFER,
1188 * \param target either 0 or a valid / error-checked texture target enum
1200 * This must be atomic (generation and allocation of texture IDs)
1206 /* Allocate new, empty texture objects */
1248 * Generate texture names.
1250 * \param n number of texture names to be generated.
1251 * \param textures an array in which will hold the generated texture names.
1255 * Calls _mesa_HashFindFreeKeys() to find a block of free texture
1256 * IDs which are stored in \p textures. Corresponding empty texture
1275 * Create texture objects.
1277 * \param target the texture target for each name to be generated.
1278 * \param n number of texture names to be generated.
1279 * \param textures an array in which will hold the generated texture names.
1283 * Calls _mesa_HashFindFreeKeys() to find a block of free texture
1284 * IDs which are stored in \p textures. Corresponding empty texture
1316 * Check if the given texture object is bound to the current draw or
1329 * "If a texture object is deleted while its image is attached to one
1331 * it is as if FramebufferTexture* had been called, with a texture of
1333 * the currently bound framebuffer. In other words, this texture image
1335 * framebuffer. Note that the texture image is specifically not
1336 * detached from any other framebuffer objects. Detaching the texture
1356 * Check if the given texture object is bound to any texture image units and
1367 /* texture was never bound */
1377 /* Bind the default texture for this unit/target */
1387 * Check if the given texture object is bound to any shader image unit
1408 * Unbinds all textures bound to the given texture image unit.
1432 * \param textures array of texture IDs to be deleted.
1436 * If we're about to delete a texture that's currently bound to any
1437 * texture unit, unbind the texture first. Decrement the reference
1438 * count on the texture object and delete it if it's zero.
1439 * Recall that texture objects can be shared among several rendering
1458 /* Check if texture is bound to any framebuffer objects.
1464 /* Check if this texture is currently bound to any texture units.
1469 /* Check if this texture is currently bound to any shader
1475 /* Make all handles that reference this texture object non-resident
1485 /* The texture _name_ is now free for re-use.
1492 /* Unreference the texobj. If refcount hits zero, the texture
1527 * Convert a GL texture target enum such as GL_TEXTURE_2D or GL_TEXTURE_3D
1528 * into the corresponding Mesa texture target index.
1580 * Do actual texture binding. All error checking should have been done prior
1581 * to calling this function. Note that the texture target (1D, 2D, etc) is
1584 * \param unit index of texture unit to update
1585 * \param texObj the new texture object (cannot be NULL)
1604 /* Check if this texture is only used by this context and is already bound.
1605 * If so, just return. For GL_OES_image_external, rebinding the texture
1622 /* if the previously bound texture uses GL_CLAMP, flag the driver here
1630 /* If the refcount on the previously bound texture is decremented to
1677 * Get pointer to new texture object (newTexObj)
1680 /* Use a default texture object */
1683 /* non-default texture object */
1689 /* The named texture object's target doesn't match the
1706 /* if this is a new texture id, allocate a texture object now */
1726 * texture object, then bind it in the current texture unit.
1728 * \param target texture target.
1729 * \param texName texture name.
1730 * \param texunit texture unit.
1769 _mesa_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture)
1783 _mesa_enum_to_string(texunit), (GLint) texture);
1785 bind_texture(ctx, target, texture, unit, false, "glBindMultiTextureEXT");
1792 * \param unit texture unit.
1793 * \param texture texture name.
1797 * If the named texture is 0, this will reset each target for the specified
1798 * texture unit to its default texture.
1799 * If the named texture is not 0 or a recognized texture name, this throws
1803 bind_texture_unit(struct gl_context *ctx, GLuint unit, GLuint texture,
1810 * "When texture is zero, each of the targets enumerated at the
1811 * beginning of this section is reset to its default texture for the
1812 * corresponding texture image unit."
1814 if (texture == 0) {
1819 /* Get the non-default texture object */
1820 texObj = _mesa_lookup_texture(ctx, texture);
1843 _mesa_BindTextureUnit_no_error(GLuint unit, GLuint texture)
1846 bind_texture_unit(ctx, unit, texture, true);
1851 _mesa_BindTextureUnit(GLuint unit, GLuint texture)
1862 _mesa_enum_to_string(GL_TEXTURE0+unit), (GLint) texture);
1864 bind_texture_unit(ctx, unit, texture, false);
1917 * texture object (per binding)."
1921 "or the name of an existing texture object)",
1954 * is greater than the number of texture image units supported
1970 * Set texture priorities.
1973 * \param texName texture names.
1974 * \param priorities corresponding texture priorities.
1978 * Looks up each texture in the hash, clamps the corresponding priority between
2015 * See if textures are loaded in texture memory.
2018 * \param texName array with the texture names.
2046 /* We only do error checking on the texture names */
2065 * See if a name corresponds to a texture.
2067 * \param texture texture name.
2069 * \return GL_TRUE if texture name corresponds to a texture, or GL_FALSE
2077 _mesa_IsTexture( GLuint texture )
2084 _mesa_debug(ctx, "glIsTexture %d\n", texture);
2086 if (!texture)
2089 t = _mesa_lookup_texture(ctx, texture);
2097 * Simplest implementation of texture locking: grab the shared tex
2101 * This is used to deal with synchronizing things when a texture object
2103 * the texture.
2131 _mesa_InvalidateTexSubImage_no_error(GLuint texture, GLint level, GLint xoffset,
2141 _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset,
2150 _mesa_debug(ctx, "glInvalidateTexSubImage %d\n", texture);
2152 t = invalidate_tex_image_error_check(ctx, texture, level,
2158 * <dim> is the size of the dimension of the texture image, and <b> is
2159 * the size of the border of that texture image, otherwise
2161 * don't exist in a given texture target)."
2174 * "For texture targets that don't have certain dimensions, this
2176 * example, to invalidate a portion of a two-dimensional texture,
2288 _mesa_InvalidateTexImage_no_error(GLuint texture, GLint level)
2295 _mesa_InvalidateTexImage(GLuint texture, GLint level)
2300 _mesa_debug(ctx, "glInvalidateTexImage(%d, %d)\n", texture, level);
2302 invalidate_tex_image_error_check(ctx, texture, level,
2319 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(immutable sparse texture)", func);
2383 _mesa_TexturePageCommitmentEXT(GLuint texture, GLint level, GLint xoffset,
2390 texObj = _mesa_lookup_texture(ctx, texture);
2391 if (texture == 0 || texObj == NULL) {
2392 _mesa_error(ctx, GL_INVALID_OPERATION, "glTexturePageCommitmentEXT(texture)");