Lines Matching defs:shader

43  * generate a unique "signature" for the vertex shader output bitmask.
44 * Shader input/output signatures are used to resolve shader linking
51 * Use the shader info to generate a bitmask indicating which generic
52 * inputs are used by the shader. A set bit indicates that GENERIC[i]
74 * Scan shader info to return a bitmask of written outputs.
138 * the fragment shader doesn't use that VS output. Just allocate
271 * Initialize the shader-neutral fields of svga_compile_key from context
277 const struct svga_shader *shader,
321 * element. This will be used to select shader instruction/resource
322 * types during shader translation.
381 * depth compare in the shader.
388 * In this case, we'll do the comparison in the shader.
472 if (shader->info.uses_images || shader->info.uses_hw_atomic ||
473 shader->info.uses_shader_buffers) {
498 /* Save the image resource target in the shader key because
500 * tgsi shader is changed to a different texture target.
542 key->image_size_used = shader->info.uses_image_size;
546 * as raw buffers in the shader key.
548 if (shader->info.const_buffers_declared &
562 /** Search for a compiled shader variant with the same compile key */
564 svga_search_shader_key(const struct svga_shader *shader,
567 struct svga_shader_variant *variant = shader->variants;
578 /** Search for a shader with the same token key */
583 struct svga_shader *shader = pshader;
587 for ( ; shader; shader = shader->next) {
588 if (memcmp(key, &shader->token_key, sizeof(struct svga_token_key)) == 0)
589 return shader;
595 * Helper function to define a gb shader for non-vgpu10 device
606 * Create gb memory for the shader and upload the shader code.
607 * Kernel module will allocate an id for the shader and issue
624 * Helper function to define a gb shader for vgpu10 device
637 * SVGA driver will allocate an integer ID for the shader and
645 /* Create gb memory for the shader and upload the shader code */
655 /* Free the shader ID */
666 * the shader creation and return an error.
689 * Issue the SVGA3D commands to define a new shader.
690 * \param variant contains the shader tokens, etc. The result->id field will
711 /* Allocate an integer ID for the shader */
718 /* Issue SVGA3D device command to define the shader */
739 * Issue the SVGA3D commands to set/bind a shader.
740 * \param result the shader to bind.
847 * page in a shader. This avoids emitting redundant state to the device
913 * Helper function to create a shader object.
922 struct svga_shader *shader = CALLOC(1, shader_structlen);
924 if (shader == NULL)
927 shader->id = svga->debug.shader_id++;
928 shader->type = templ->type;
929 shader->stage = stage;
931 shader->tokens = pipe_shader_state_to_tgsi_tokens(pipe->screen, templ);
933 if (shader->type == PIPE_SHADER_IR_TGSI) {
934 /* Collect basic info of the shader */
935 svga_tgsi_scan_shader(shader);
938 debug_printf("Unexpected nir shader\n");
944 shader->stream_output = svga_create_stream_output(svga, shader,
948 return shader;
953 * Helper function to compile a shader.
954 * Depending on the shader IR type, it calls the corresponding
955 * compile shader function.
959 struct svga_shader *shader,
966 if (shader->type == PIPE_SHADER_IR_TGSI) {
967 variant = svga_tgsi_compile_shader(svga, shader, key);
969 debug_printf("Unexpected nir shader\n");
974 if (shader->get_dummy_shader != NULL) {
975 debug_printf("Failed to compile shader, using dummy shader.\n");
976 variant = shader->get_dummy_shader(svga, shader, key);
980 /* too big, use shader */
981 if (shader->get_dummy_shader != NULL) {
982 debug_printf("Shader too large (%u bytes), using dummy shader.\n",
989 /* Use simple pass-through shader instead */
990 variant = shader->get_dummy_shader(svga, shader, key);
1006 variant->next = shader->variants;
1007 shader->variants = variant;