Home
last modified time | relevance | path

Searched refs:shader (Results 1 – 25 of 162) sorted by relevance

1234567

/external/mesa3d/src/glsl/
Dmain.cpp49 compile_shader(const struct gl_context *ctx, struct gl_shader *shader) in compile_shader() argument
52 new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader); in compile_shader()
54 const char *source = shader->Source; in compile_shader()
72 shader->ir = new(shader) exec_list; in compile_shader()
74 _mesa_ast_to_hir(shader->ir, state); in compile_shader()
78 validate_ir_tree(shader->ir); in compile_shader()
79 _mesa_print_ir(shader->ir, state); in compile_shader()
83 if (!state->error && !shader->ir->is_empty()) { in compile_shader()
86 progress = do_common_optimization(shader->ir, false, 32); in compile_shader()
89 validate_ir_tree(shader->ir); in compile_shader()
[all …]
Dglsl_compiler.cpp150 compile_shader(struct gl_context *ctx, struct gl_shader *shader) in compile_shader() argument
153 new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader); in compile_shader()
155 const char *source = shader->Source; in compile_shader()
173 shader->ir = new(shader) exec_list; in compile_shader()
175 _mesa_ast_to_hir(shader->ir, state); in compile_shader()
179 validate_ir_tree(shader->ir); in compile_shader()
180 _mesa_print_ir(shader->ir, state); in compile_shader()
184 if (!state->error && !shader->ir->is_empty()) { in compile_shader()
187 progress = do_common_optimization(shader->ir, false, 32); in compile_shader()
190 validate_ir_tree(shader->ir); in compile_shader()
[all …]
/external/mesa3d/src/glsl/glcpp/
Dpp.c67 in_directive(const char *shader, const char *ptr) in in_directive() argument
69 assert(ptr >= shader); in in_directive()
72 for (; ptr >= shader && *ptr != '#'; ptr--) { in in_directive()
76 if (ptr >= shader) { in in_directive()
78 for (ptr--; ptr >= shader && isblank(*ptr); ptr--); in in_directive()
80 if (ptr < shader || *ptr == '\n') in in_directive()
91 remove_line_continuations(glcpp_parser_t *ctx, const char *shader) in remove_line_continuations() argument
96 const char *search_start = shader; in remove_line_continuations()
102 int n = newline - shader; in remove_line_continuations()
118 if (in_directive(shader, backslash)) { in remove_line_continuations()
[all …]
Dglcpp.c112 const char *shader; in main() local
119 shader = load_text_file (ctx, filename); in main()
120 if (shader == NULL) in main()
123 ret = preprocess(ctx, &shader, &info_log, NULL, API_OPENGL); in main()
125 printf("%s", shader); in main()
/external/mesa3d/src/mesa/main/
Dshaderobj.c18 …struct gl_shader * shader = (struct gl_shader *)_hieralloc_zero(ctx, sizeof(struct gl_shader), "zr… in _mesa_new_shader() local
19 if (shader) { in _mesa_new_shader()
20 shader->Type = type; in _mesa_new_shader()
21 shader->Name = name; in _mesa_new_shader()
22 shader->RefCount = 1; in _mesa_new_shader()
24 return shader; in _mesa_new_shader()
27 void _mesa_delete_shader(const void * ctx, struct gl_shader *shader) in _mesa_delete_shader() argument
29 if (!shader) in _mesa_delete_shader()
31 if (shader->RefCount > 1) { in _mesa_delete_shader()
32 shader->DeletePending = GL_TRUE; in _mesa_delete_shader()
[all …]
/external/mesa3d/src/pixelflinger2/
Dshader.cpp137 extern "C" void compile_shader(const struct gl_context *ctx, struct gl_shader *shader);
151 gl_shader * shader = _mesa_new_shader(NULL, 0, type); in ShaderCreate() local
152 if (!shader) in ShaderCreate()
154 assert(1 == shader->RefCount); in ShaderCreate()
155 return shader; in ShaderCreate()
158 void GGLShaderSource(gl_shader_t * shader, GLsizei count, const char ** string, const int * length) in GGLShaderSource() argument
160 hieralloc_free(const_cast<GLchar *>(shader->Source)); in GGLShaderSource()
165shader->Source = hieralloc_strndup_append(const_cast<GLchar *>(shader->Source), string[i], len); in GGLShaderSource()
170 GLboolean GGLShaderCompile(gl_shader * shader, const char * glsl, const char ** infoLog) in GGLShaderCompile() argument
173 shader->Source = glsl; in GGLShaderCompile()
[all …]
/external/skia/tests/
DShaderOpacityTest.cpp18 SkShader* shader = SkShader::CreateBitmapShader(bmp, in test_bitmap() local
20 REPORTER_ASSERT(reporter, shader); in test_bitmap()
21 REPORTER_ASSERT(reporter, !shader->isOpaque()); in test_bitmap()
22 shader->unref(); in test_bitmap()
28 shader = SkShader::CreateBitmapShader(bmp, in test_bitmap()
30 REPORTER_ASSERT(reporter, shader); in test_bitmap()
31 REPORTER_ASSERT(reporter, !shader->isOpaque()); in test_bitmap()
32 shader->unref(); in test_bitmap()
36 shader = SkShader::CreateBitmapShader(bmp, in test_bitmap()
38 REPORTER_ASSERT(reporter, shader); in test_bitmap()
[all …]
/external/skia/src/animator/
DSkDrawShader.cpp32 if (fPaint->shader != (SkDrawShader*) -1) in add()
34 fPaint->shader = this; in add()
39 void SkDrawShader::addPostlude(SkShader* shader) { in addPostlude() argument
41 shader->setLocalMatrix(matrix->getMatrix()); in addPostlude()
59 if (fPaint->shader != (SkDrawShader*) -1) in add()
61 fPaint->shader = this; in add()
76 SkShader* shader = SkShader::CreateBitmapShader(image->fBitmap, in getShader() local
79 SkAutoTDelete<SkShader> autoDel(shader); in getShader()
80 addPostlude(shader); in getShader()
82 return shader; in getShader()
DSkDrawGradient.cpp186 SkShader* shader = SkGradientShader::CreateLinear((SkPoint*)points.begin(), in getShader() local
188 SkAutoTDelete<SkShader> autoDel(shader); in getShader()
189 addPostlude(shader); in getShader()
191 return shader; in getShader()
221 SkShader* shader = SkGradientShader::CreateRadial(center, in getShader() local
223 SkAutoTDelete<SkShader> autoDel(shader); in getShader()
224 addPostlude(shader); in getShader()
226 return shader; in getShader()
/external/webkit/Source/WebCore/html/canvas/
DWebGLProgram.cpp118 bool WebGLProgram::attachShader(WebGLShader* shader) in attachShader() argument
120 if (!shader || !shader->object()) in attachShader()
122 switch (shader->getType()) { in attachShader()
126 m_vertexShader = shader; in attachShader()
131 m_fragmentShader = shader; in attachShader()
138 bool WebGLProgram::detachShader(WebGLShader* shader) in detachShader() argument
140 if (!shader || !shader->object()) in detachShader()
142 switch (shader->getType()) { in detachShader()
144 if (m_vertexShader != shader) in detachShader()
149 if (m_fragmentShader != shader) in detachShader()
/external/webkit/Source/WebCore/platform/graphics/android/layers/
DVideoLayerAndroid.cpp76 ShaderProgram* shader = TilesManager::instance()->shader(); in showPreparingAnimation() local
81 shader->drawQuad(&backGroundQuadData); in showPreparingAnimation()
97 shader->drawQuad(&spinnerQuadData); in showPreparingAnimation()
104 shader->drawQuad(&spinnerQuadData); in showPreparingAnimation()
132 ShaderProgram* shader = tilesManager->shader(); in drawGL() local
145 shader->drawQuad(&pureColorQuadData); in drawGL()
173 shader->drawVideoLayerQuad(m_drawTransform, surfaceMatrix, in drawGL()
184 shader->drawQuad(&iconQuadData); in drawGL()
192 shader->drawVideoLayerQuad(m_drawTransform, matrix, in drawGL()
197 shader->drawQuad(&pureColorQuadData); in drawGL()
[all …]
/external/jmonkeyengine/engine/src/core/com/jme3/material/
DTechnique.java36 import com.jme3.shader.*;
53 private Shader shader; field in Technique
98 return shader; in getShader()
119 if (shader != null) { in notifySetParam()
132 if (shader != null) { in notifyClearParam()
136 shader.removeUniform(paramName); in notifyClearParam()
141 Uniform u = shader.getUniform(paramName); in updateUniformParam()
218 shader = manager.loadShader(key); in loadShader()
219 if (shader == null) { in loadShader()
231 Uniform uniform = shader.getUniform("g_" + binding.name()); in loadShader()
[all …]
DMaterial.java47 import com.jme3.shader.Shader;
48 import com.jme3.shader.Uniform;
49 import com.jme3.shader.VarType;
643 protected void updateLightListUniforms(Shader shader, Geometry g, int numLights) { in updateLightListUniforms() argument
649 Uniform lightColor = shader.getUniform("g_LightColor"); in updateLightListUniforms()
650 Uniform lightPos = shader.getUniform("g_LightPosition"); in updateLightListUniforms()
651 Uniform lightDir = shader.getUniform("g_LightDirection"); in updateLightListUniforms()
656 Uniform ambientColor = shader.getUniform("g_AmbientLightColor"); in updateLightListUniforms()
715 protected void renderMultipassLighting(Shader shader, Geometry g, RenderManager rm) { in renderMultipassLighting() argument
719 Uniform lightDir = shader.getUniform("g_LightDirection"); in renderMultipassLighting()
[all …]
/external/webkit/Source/WebCore/platform/graphics/chromium/
DProgramBinding.cpp64 unsigned shader = m_context->createShader(type); in loadShader() local
65 if (!shader) in loadShader()
68 GLC(m_context, m_context->shaderSource(shader, sourceString)); in loadShader()
69 GLC(m_context, m_context->compileShader(shader)); in loadShader()
71 GLC(m_context, m_context->getShaderiv(shader, GraphicsContext3D::COMPILE_STATUS, &compiled)); in loadShader()
73 GLC(m_context, m_context->deleteShader(shader)); in loadShader()
76 return shader; in loadShader()
/external/webkit/Source/WebCore/platform/graphics/gpu/
DShader.cpp83 unsigned shader = context->createShader(type); in loadShader() local
84 if (!shader) in loadShader()
87 context->shaderSource(shader, shaderSource); in loadShader()
88 context->compileShader(shader); in loadShader()
90 context->getShaderiv(shader, GraphicsContext3D::COMPILE_STATUS, &compileStatus); in loadShader()
92 String infoLog = context->getShaderInfoLog(shader); in loadShader()
94 context->deleteShader(shader); in loadShader()
97 return shader; in loadShader()
/external/jmonkeyengine/engine/src/android/com/jme3/renderer/android/
DOGLESShaderRenderer.java48 import com.jme3.shader.Attribute;
49 import com.jme3.shader.Shader;
50 import com.jme3.shader.Shader.ShaderSource;
51 import com.jme3.shader.Shader.ShaderType;
52 import com.jme3.shader.Uniform;
743 protected void updateUniformLocation(Shader shader, Uniform uniform) { in updateUniformLocation() argument
748 …logger.log(Level.INFO, "GLES20.glGetUniformLocation({0}, {1})", new Object[]{shader.getId(), unifo… in updateUniformLocation()
750 int loc = GLES20.glGetUniformLocation(shader.getId(), uniform.getName()); in updateUniformLocation()
763 protected void updateUniform(Shader shader, Uniform uniform) { in updateUniform() argument
764 int shaderId = shader.getId(); in updateUniform()
[all …]
/external/mesa3d/include/pixelflinger2/
Dpixelflinger2_interface.h225 …void (* ShaderSource)(gl_shader_t * shader, GLsizei count, const char ** string, const int * lengt…
228 GLboolean (* ShaderCompile)(const GGLInterface_t * iface, gl_shader_t * shader,
231 void (* ShaderDelete)(const GGLInterface_t * iface, gl_shader_t * shader);
238 gl_shader_t * shader);
242 gl_shader_t * shader);
252 void (* ShaderGetiv)(const gl_shader_t * shader, const GLenum pname, GLint * params);
254 …void (* ShaderGetInfoLog)(const gl_shader_t * shader, GLsizei bufsize, GLsizei* length, GLchar* in…
303 GLboolean GGLShaderCompile(gl_shader_t * shader, const char * glsl, const char ** infoLog);
305 void GGLShaderDelete(gl_shader_t * shader);
311 unsigned GGLShaderAttach(gl_shader_program_t * program, gl_shader_t * shader);
[all …]
/external/skia/src/effects/
DSkColorFilters.cpp88 virtual void filterSpan(const SkPMColor shader[], int count, in filterSpan() argument
93 virtual void filterSpan16(const uint16_t shader[], int count, in filterSpan16() argument
128 virtual void filterSpan(const SkPMColor shader[], int count, in filterSpan() argument
133 fColor32Proc(result, shader, count, fPMColor); in filterSpan()
136 virtual void filterSpan16(const uint16_t shader[], int count, in filterSpan16() argument
179 virtual void filterSpan(const SkPMColor shader[], int count, in filterSpan() argument
185 result[i] = proc(color, shader[i]); in filterSpan()
189 virtual void filterSpan16(const uint16_t shader[], int count, in filterSpan16() argument
197 result[i] = proc16(color, shader[i]); in filterSpan16()
302 virtual void filterSpan(const SkPMColor shader[], int count, in filterSpan() argument
[all …]
/external/jmonkeyengine/engine/src/core/com/jme3/renderer/
DStatistics.java36 import com.jme3.shader.Shader;
136 public void onShaderUse(Shader shader, boolean wasSwitched){ in onShaderUse() argument
137 assert shader.getId() >= 1; in onShaderUse()
139 if (!shadersUsed.contains(shader.getId())) in onShaderUse()
140 shadersUsed.add(shader.getId()); in onShaderUse()
DRenderer.java40 import com.jme3.shader.Shader;
41 import com.jme3.shader.Shader.ShaderSource;
177 public void setShader(Shader shader); in setShader() argument
185 public void deleteShader(Shader shader); in deleteShader() argument
/external/jmonkeyengine/engine/src/lwjgl/com/jme3/renderer/lwjgl/
DLwjglRenderer.java46 import com.jme3.shader.Attribute;
47 import com.jme3.shader.Shader;
48 import com.jme3.shader.Shader.ShaderSource;
49 import com.jme3.shader.Shader.ShaderType;
50 import com.jme3.shader.Uniform;
760 protected void updateUniformLocation(Shader shader, Uniform uniform) { in updateUniformLocation() argument
764 int loc = glGetUniformLocation(shader.getId(), nameBuf); in updateUniformLocation()
768 …Uniform {0} is not declared in shader {1}.", new Object[]{uniform.getName(), shader.getSources()}); in updateUniformLocation()
774 protected void bindProgram(Shader shader){ in bindProgram() argument
775 int shaderId = shader.getId(); in bindProgram()
[all …]
/external/webkit/Source/WebCore/platform/graphics/opengl/
DGraphicsContext3DOpenGL.cpp353 void GraphicsContext3D::attachShader(Platform3DObject program, Platform3DObject shader) in attachShader() argument
356 ASSERT(shader); in attachShader()
358 ::glAttachShader(program, shader); in attachShader()
489 void GraphicsContext3D::compileShader(Platform3DObject shader) in compileShader() argument
491 ASSERT(shader); in compileShader()
497 glGetShaderiv(shader, SHADER_TYPE, &GLshaderType); in compileShader()
506 HashMap<Platform3DObject, ShaderSourceEntry>::iterator result = m_shaderSourceMap.find(shader); in compileShader()
529 ::glShaderSource(shader, 1, &translatedShaderPtr, &translatedShaderLength); in compileShader()
531 ::glCompileShader(shader); in compileShader()
535 ::glGetShaderiv(shader, COMPILE_STATUS, &GLCompileSuccess); in compileShader()
[all …]
/external/skia/src/core/
DSkBlitter_RGB16.cpp702 SkShader* shader = fShader; in blitH() local
704 int alpha = shader->getSpan16Alpha(); in blitH()
706 shader->shadeSpan16(x, y, device, width); in blitH()
709 shader->shadeSpan16(x, y, span16, width); in blitH()
715 SkShader* shader = fShader; in blitRect() local
718 int alpha = shader->getSpan16Alpha(); in blitRect()
723 shader->shadeSpan16(x, y, dst, width); in blitRect()
734 shader->shadeSpan16(x, y, dst, width); in blitRect()
743 shader->shadeSpan16(x, y, span16, width); in blitRect()
750 shader->shadeSpan16(x, y, span16, width); in blitRect()
[all …]
/external/webkit/Source/WebCore/platform/graphics/android/rendering/
DTileTexture.cpp126 ShaderProgram* shader = TilesManager::instance()->shader(); in drawGL() local
141 shader->drawQuad(&data); in drawGL()
145 shader->drawQuad(&data); in drawGL()
/external/skia/gm/
Dgradients.cpp109 SkShader* shader = gGradMakers[j](pts, gGradData[i], tm, NULL); in onDraw() local
110 paint.setShader(shader); in onDraw()
112 shader->unref(); in onDraw()
203 SkShader* shader = SkGradientShader::CreateRadial( in onDraw() local
207 paint.setShader(shader); in onDraw()
209 shader->unref(); in onDraw()
243 SkShader* shader = in onDraw() local
247 paint.setShader(shader)->unref(); in onDraw()

1234567