You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: texture_compat.go
    path of file: ./repos/gapid/gapis/api/gles
    
    the code of the file until where you have to start completion: // Copyright (C) 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package gles

    
func (tc *textureCompat) postTexParameter(ctx context.Context, target, parameter GLenum, out transform.Writer, id api.CmdID, cmd api.Cmd) {
	if tc.v.IsES {
		return
	}

	s := out.State()
	switch parameter {
	case GLenum_GL_TEXTURE_SWIZZLE_R, GLenum_GL_TEXTURE_SWIZZLE_G, GLenum_GL_TEXTURE_SWIZZLE_B, GLenum_GL_TEXTURE_SWIZZLE_A:
		if t, err := subGetBoundTextureOrErrorInvalidEnum(ctx, nil, api.CmdNoID, nil, s, GetState(s), cmd.Thread(), nil, nil, target); err == nil {
			_, curr := tc.getSwizzle(t, parameter)
			// The tex parameter was recently mutated, so set the original swizzle from current state.
			tc.origSwizzle[parameter][t] = curr
			// Combine the original and compat swizzles and write out the commands to set it.
			cb := CommandBuilder{Thread: cmd.Thread(), Arena: s.Arena}
			tc.writeCompatSwizzle(ctx, cb, t, parameter, out, id)
		}
	case GLenum_GL_TEXTURE_SWIZZLE_RGBA:
		log.E(ctx, "Unexpected GL_TEXTURE_SWIZZLE_RGBA")
	}
}