Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "rsContext.h" |
Alex Sakhartchouk | 77d9f4b | 2011-01-31 14:53:24 -0800 | [diff] [blame] | 18 | #ifndef ANDROID_RS_SERIALIZE |
Jason Sams | 1aa5a4e | 2009-06-22 17:15:15 -0700 | [diff] [blame] | 19 | #include <GLES/gl.h> |
| 20 | #include <GLES/glext.h> |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 21 | #include <GLES2/gl2.h> |
| 22 | #include <GLES2/gl2ext.h> |
Alex Sakhartchouk | 77d9f4b | 2011-01-31 14:53:24 -0800 | [diff] [blame] | 23 | #endif //ANDROID_RS_SERIALIZE |
Alex Sakhartchouk | fb6b614 | 2010-05-21 12:53:13 -0700 | [diff] [blame] | 24 | |
| 25 | #include "rsProgramFragment.h" |
Jason Sams | 1aa5a4e | 2009-06-22 17:15:15 -0700 | [diff] [blame] | 26 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 27 | using namespace android; |
| 28 | using namespace android::renderscript; |
| 29 | |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 30 | ProgramFragment::ProgramFragment(Context *rsc, const char * shaderText, |
| 31 | uint32_t shaderLength, const uint32_t * params, |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 32 | uint32_t paramLength) |
| 33 | : Program(rsc, shaderText, shaderLength, params, paramLength) { |
| 34 | |
Jason Sams | 6445e52 | 2010-08-04 17:50:20 -0700 | [diff] [blame] | 35 | mConstantColor[0] = 1.f; |
| 36 | mConstantColor[1] = 1.f; |
| 37 | mConstantColor[2] = 1.f; |
| 38 | mConstantColor[3] = 1.f; |
| 39 | |
Alex Sakhartchouk | 6e93421 | 2010-08-31 12:02:01 -0700 | [diff] [blame] | 40 | init(rsc); |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 41 | } |
| 42 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 43 | ProgramFragment::~ProgramFragment() { |
| 44 | if (mShaderID) { |
Alex Sakhartchouk | 889fe50 | 2010-10-01 10:54:06 -0700 | [diff] [blame] | 45 | mRSC->mShaderCache.cleanupFragment(mShaderID); |
| 46 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 47 | } |
| 48 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 49 | void ProgramFragment::setConstantColor(Context *rsc, float r, float g, float b, float a) { |
| 50 | if (isUserProgram()) { |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 51 | LOGE("Attempting to set fixed function emulation color on user program"); |
| 52 | rsc->setError(RS_ERROR_BAD_SHADER, "Cannot set fixed function emulation color on user program"); |
| 53 | return; |
| 54 | } |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 55 | if (mConstants[0].get() == NULL) { |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 56 | LOGE("Unable to set fixed function emulation color because allocation is missing"); |
| 57 | rsc->setError(RS_ERROR_BAD_SHADER, "Unable to set fixed function emulation color because allocation is missing"); |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 58 | return; |
| 59 | } |
Jason Sams | 6445e52 | 2010-08-04 17:50:20 -0700 | [diff] [blame] | 60 | mConstantColor[0] = r; |
| 61 | mConstantColor[1] = g; |
| 62 | mConstantColor[2] = b; |
| 63 | mConstantColor[3] = a; |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 64 | memcpy(mConstants[0]->getPtr(), mConstantColor, 4*sizeof(float)); |
Jason Sams | 6445e52 | 2010-08-04 17:50:20 -0700 | [diff] [blame] | 65 | mDirty = true; |
| 66 | } |
| 67 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 68 | void ProgramFragment::setupGL2(Context *rsc, ProgramFragmentState *state, ShaderCache *sc) { |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 69 | //LOGE("sgl2 frag1 %x", glGetError()); |
| 70 | if ((state->mLast.get() == this) && !mDirty) { |
Jason Sams | e64c2f1 | 2010-06-22 17:22:13 -0700 | [diff] [blame] | 71 | return; |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 72 | } |
| 73 | state->mLast.set(this); |
| 74 | |
Jason Sams | 3eb28f0 | 2010-01-27 14:41:43 -0800 | [diff] [blame] | 75 | rsc->checkError("ProgramFragment::setupGL2 start"); |
Jason Sams | 6445e52 | 2010-08-04 17:50:20 -0700 | [diff] [blame] | 76 | |
Alex Sakhartchouk | 6e93421 | 2010-08-31 12:02:01 -0700 | [diff] [blame] | 77 | rsc->checkError("ProgramFragment::setupGL2 begin uniforms"); |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 78 | setupUserConstants(rsc, sc, true); |
Alex Sakhartchouk | 6e93421 | 2010-08-31 12:02:01 -0700 | [diff] [blame] | 79 | |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 80 | uint32_t numTexturesToBind = mTextureCount; |
| 81 | uint32_t numTexturesAvailable = rsc->getMaxFragmentTextures(); |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 82 | if (numTexturesToBind >= numTexturesAvailable) { |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 83 | LOGE("Attempting to bind %u textures on shader id %u, but only %u are available", |
| 84 | mTextureCount, (uint32_t)this, numTexturesAvailable); |
| 85 | rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind more textuers than available"); |
| 86 | numTexturesToBind = numTexturesAvailable; |
| 87 | } |
| 88 | |
| 89 | for (uint32_t ct=0; ct < numTexturesToBind; ct++) { |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 90 | glActiveTexture(GL_TEXTURE0 + ct); |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 91 | if (!mTextures[ct].get()) { |
| 92 | LOGE("No texture bound for shader id %u, texture unit %u", (uint)this, ct); |
| 93 | rsc->setError(RS_ERROR_BAD_SHADER, "No texture bound"); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 94 | continue; |
| 95 | } |
| 96 | |
Jason Sams | cf4c7c9 | 2009-12-14 12:57:40 -0800 | [diff] [blame] | 97 | mTextures[ct]->uploadCheck(rsc); |
Alex Sakhartchouk | 84e4027 | 2010-11-18 15:22:43 -0800 | [diff] [blame] | 98 | GLenum target = (GLenum)mTextures[ct]->getGLTarget(); |
| 99 | if (target != GL_TEXTURE_2D && target != GL_TEXTURE_CUBE_MAP) { |
| 100 | LOGE("Attempting to bind unknown texture to shader id %u, texture unit %u", (uint)this, ct); |
| 101 | rsc->setError(RS_ERROR_BAD_SHADER, "Non-texture allocation bound to a shader"); |
| 102 | } |
| 103 | glBindTexture(target, mTextures[ct]->getTextureID()); |
Jason Sams | 3eb28f0 | 2010-01-27 14:41:43 -0800 | [diff] [blame] | 104 | rsc->checkError("ProgramFragment::setupGL2 tex bind"); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 105 | if (mSamplers[ct].get()) { |
Jason Sams | 900f161 | 2010-09-16 18:18:29 -0700 | [diff] [blame] | 106 | mSamplers[ct]->setupGL(rsc, mTextures[ct].get()); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 107 | } else { |
Alex Sakhartchouk | 84e4027 | 2010-11-18 15:22:43 -0800 | [diff] [blame] | 108 | glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); |
| 109 | glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); |
| 110 | glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
| 111 | glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
Jason Sams | 3eb28f0 | 2010-01-27 14:41:43 -0800 | [diff] [blame] | 112 | rsc->checkError("ProgramFragment::setupGL2 tex env"); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 113 | } |
| 114 | |
Alex Sakhartchouk | 660ccc7 | 2010-09-02 18:43:24 -0700 | [diff] [blame] | 115 | glUniform1i(sc->fragUniformSlot(mTextureUniformIndexStart + ct), ct); |
Jason Sams | 3eb28f0 | 2010-01-27 14:41:43 -0800 | [diff] [blame] | 116 | rsc->checkError("ProgramFragment::setupGL2 uniforms"); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | glActiveTexture(GL_TEXTURE0); |
| 120 | mDirty = false; |
Jason Sams | 433eca3 | 2010-01-06 11:57:52 -0800 | [diff] [blame] | 121 | rsc->checkError("ProgramFragment::setupGL2"); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 122 | } |
| 123 | |
Jason Sams | cd50653 | 2009-12-15 19:10:11 -0800 | [diff] [blame] | 124 | void ProgramFragment::loadShader(Context *rsc) { |
| 125 | Program::loadShader(rsc, GL_FRAGMENT_SHADER); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 126 | } |
| 127 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 128 | void ProgramFragment::createShader() { |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 129 | if (mUserShader.length() > 1) { |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 130 | mShader.append("precision mediump float;\n"); |
Alex Sakhartchouk | 660ccc7 | 2010-09-02 18:43:24 -0700 | [diff] [blame] | 131 | appendUserConstants(); |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 132 | char buf[256]; |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 133 | for (uint32_t ct=0; ct < mTextureCount; ct++) { |
Alex Sakhartchouk | 84e4027 | 2010-11-18 15:22:43 -0800 | [diff] [blame] | 134 | if (mTextureTargets[ct] == RS_TEXTURE_2D) { |
Jason Sams | 87319de | 2010-11-22 16:20:16 -0800 | [diff] [blame] | 135 | snprintf(buf, sizeof(buf), "uniform sampler2D UNI_Tex%i;\n", ct); |
Alex Sakhartchouk | 84e4027 | 2010-11-18 15:22:43 -0800 | [diff] [blame] | 136 | } else { |
Jason Sams | 87319de | 2010-11-22 16:20:16 -0800 | [diff] [blame] | 137 | snprintf(buf, sizeof(buf), "uniform samplerCube UNI_Tex%i;\n", ct); |
Alex Sakhartchouk | 84e4027 | 2010-11-18 15:22:43 -0800 | [diff] [blame] | 138 | } |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 139 | mShader.append(buf); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 140 | } |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 141 | mShader.append(mUserShader); |
| 142 | } else { |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 143 | LOGE("ProgramFragment::createShader cannot create program, shader code not defined"); |
| 144 | rsAssert(0); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 145 | } |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 146 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 147 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 148 | void ProgramFragment::init(Context *rsc) { |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame] | 149 | uint32_t uniformIndex = 0; |
Alex Sakhartchouk | 6e93421 | 2010-08-31 12:02:01 -0700 | [diff] [blame] | 150 | if (mUserShader.size() > 0) { |
| 151 | for (uint32_t ct=0; ct < mConstantCount; ct++) { |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame] | 152 | initAddUserElement(mConstantTypes[ct]->getElement(), mUniformNames, mUniformArraySizes, &uniformIndex, RS_SHADER_UNI); |
Alex Sakhartchouk | 6e93421 | 2010-08-31 12:02:01 -0700 | [diff] [blame] | 153 | } |
| 154 | } |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame] | 155 | mTextureUniformIndexStart = uniformIndex; |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 156 | char buf[256]; |
| 157 | for (uint32_t ct=0; ct < mTextureCount; ct++) { |
Jason Sams | 87319de | 2010-11-22 16:20:16 -0800 | [diff] [blame] | 158 | snprintf(buf, sizeof(buf), "UNI_Tex%i", ct); |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame] | 159 | mUniformNames[uniformIndex].setTo(buf); |
| 160 | mUniformArraySizes[uniformIndex] = 1; |
| 161 | uniformIndex++; |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 162 | } |
Alex Sakhartchouk | 6e93421 | 2010-08-31 12:02:01 -0700 | [diff] [blame] | 163 | |
| 164 | createShader(); |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 165 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 166 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 167 | void ProgramFragment::serialize(OStream *stream) const { |
Alex Sakhartchouk | fb6b614 | 2010-05-21 12:53:13 -0700 | [diff] [blame] | 168 | } |
| 169 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 170 | ProgramFragment *ProgramFragment::createFromStream(Context *rsc, IStream *stream) { |
Alex Sakhartchouk | fb6b614 | 2010-05-21 12:53:13 -0700 | [diff] [blame] | 171 | return NULL; |
| 172 | } |
| 173 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 174 | ProgramFragmentState::ProgramFragmentState() { |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 175 | mPF = NULL; |
| 176 | } |
| 177 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 178 | ProgramFragmentState::~ProgramFragmentState() { |
Jason Sams | 225afd3 | 2010-10-21 14:06:55 -0700 | [diff] [blame] | 179 | ObjectBase::checkDelete(mPF); |
| 180 | mPF = NULL; |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 181 | } |
| 182 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 183 | void ProgramFragmentState::init(Context *rsc) { |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 184 | String8 shaderString(RS_SHADER_INTERNAL); |
| 185 | shaderString.append("varying lowp vec4 varColor;\n"); |
Alex Sakhartchouk | 7ffcaf2 | 2010-10-06 11:15:01 -0700 | [diff] [blame] | 186 | shaderString.append("varying vec2 varTex0;\n"); |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 187 | shaderString.append("void main() {\n"); |
| 188 | shaderString.append(" lowp vec4 col = UNI_Color;\n"); |
| 189 | shaderString.append(" gl_FragColor = col;\n"); |
| 190 | shaderString.append("}\n"); |
| 191 | |
| 192 | const Element *colorElem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4); |
| 193 | rsc->mStateElement.elementBuilderBegin(); |
| 194 | rsc->mStateElement.elementBuilderAdd(colorElem, "Color", 1); |
| 195 | const Element *constInput = rsc->mStateElement.elementBuilderCreate(rsc); |
| 196 | |
Jason Sams | f0c1df4 | 2010-10-26 13:09:17 -0700 | [diff] [blame] | 197 | Type *inputType = Type::getType(rsc, constInput, 1, 0, 0, false, false); |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 198 | |
Alex Sakhartchouk | 84e4027 | 2010-11-18 15:22:43 -0800 | [diff] [blame] | 199 | uint32_t tmp[2]; |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 200 | tmp[0] = RS_PROGRAM_PARAM_CONSTANT; |
| 201 | tmp[1] = (uint32_t)inputType; |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 202 | |
Jason Sams | 366c9c8 | 2010-12-08 16:14:36 -0800 | [diff] [blame] | 203 | Allocation *constAlloc = new Allocation(rsc, inputType, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS); |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 204 | ProgramFragment *pf = new ProgramFragment(rsc, shaderString.string(), |
Alex Sakhartchouk | 84e4027 | 2010-11-18 15:22:43 -0800 | [diff] [blame] | 205 | shaderString.length(), tmp, 2); |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 206 | pf->bindAllocation(rsc, constAlloc, 0); |
| 207 | pf->setConstantColor(rsc, 1.0f, 1.0f, 1.0f, 1.0f); |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 208 | |
Jason Sams | 8ce125b | 2009-06-17 16:52:59 -0700 | [diff] [blame] | 209 | mDefault.set(pf); |
| 210 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 211 | |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 212 | void ProgramFragmentState::deinit(Context *rsc) { |
Jason Sams | f2649a9 | 2009-09-25 16:37:33 -0700 | [diff] [blame] | 213 | mDefault.clear(); |
| 214 | mLast.clear(); |
| 215 | } |
| 216 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 217 | namespace android { |
| 218 | namespace renderscript { |
| 219 | |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 220 | RsProgramFragment rsi_ProgramFragmentCreate(Context *rsc, const char * shaderText, |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 221 | uint32_t shaderLength, const uint32_t * params, |
Alex Sakhartchouk | afb743a | 2010-11-09 17:00:54 -0800 | [diff] [blame] | 222 | uint32_t paramLength) { |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 223 | ProgramFragment *pf = new ProgramFragment(rsc, shaderText, shaderLength, params, paramLength); |
| 224 | pf->incUserRef(); |
Alex Sakhartchouk | 383e5b1 | 2010-09-23 16:16:33 -0700 | [diff] [blame] | 225 | //LOGE("rsi_ProgramFragmentCreate %p", pf); |
Jason Sams | f2e4fa2 | 2009-12-15 13:27:04 -0800 | [diff] [blame] | 226 | return pf; |
| 227 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 228 | |
| 229 | } |
| 230 | } |
| 231 | |