blob: 9541bf4ea842f8fa6d0f0e05a829db3184fce408 [file] [log] [blame]
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -06001/*
2 * XGL
3 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -060025#include "shader.h"
Chia-I Wued833872014-08-23 17:00:35 +080026#include "pipeline_priv.h"
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -060027#include "genhw/genhw.h"
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060028#include "genhw/gen_render_3d.xml.h"
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060029
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -060030static XGL_RESULT pipeline_ia_state(struct intel_dev *dev, struct intel_pipeline *pipeline,
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060031 const XGL_PIPELINE_IA_STATE_CREATE_INFO* ia_state)
32{
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -060033 pipeline->ia_state = *ia_state;
34
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060035 if (ia_state->provokingVertex == XGL_PROVOKING_VERTEX_FIRST) {
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060036 pipeline->provoking_vertex_tri = 0;
37 pipeline->provoking_vertex_trifan = 1;
38 pipeline->provoking_vertex_line = 0;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060039 } else {
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060040 pipeline->provoking_vertex_tri = 2;
41 pipeline->provoking_vertex_trifan = 2;
42 pipeline->provoking_vertex_line = 1;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060043 }
44
45 switch (ia_state->topology) {
46 case XGL_TOPOLOGY_POINT_LIST:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060047 pipeline->prim_type = GEN6_3DPRIM_POINTLIST;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060048 break;
49 case XGL_TOPOLOGY_LINE_LIST:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060050 pipeline->prim_type = GEN6_3DPRIM_LINELIST;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060051 break;
52 case XGL_TOPOLOGY_LINE_STRIP:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060053 pipeline->prim_type = GEN6_3DPRIM_LINESTRIP;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060054 break;
55 case XGL_TOPOLOGY_TRIANGLE_LIST:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060056 pipeline->prim_type = GEN6_3DPRIM_TRILIST;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060057 break;
58 case XGL_TOPOLOGY_TRIANGLE_STRIP:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060059 pipeline->prim_type = GEN6_3DPRIM_TRISTRIP;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060060 break;
61 case XGL_TOPOLOGY_RECT_LIST:
62 /*
63 * TODO: Rect lists are special in XGL, do we need to do
64 * something special here?
65 * XGL Guide:
66 * The rectangle list is a special geometry primitive type
67 * that can be used for implementing post-processing techniques
68 * or efficient copy operations. There are some special limitations
69 * for rectangle primitives. They cannot be clipped, must
70 * be axis aligned and cannot have depth gradient.
71 * Failure to comply with these restrictions results in
72 * undefined rendering results.
73 */
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060074 pipeline->prim_type = GEN6_3DPRIM_RECTLIST;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060075 break;
76 case XGL_TOPOLOGY_QUAD_LIST:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060077 pipeline->prim_type = GEN6_3DPRIM_QUADLIST;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060078 break;
79 case XGL_TOPOLOGY_QUAD_STRIP:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060080 pipeline->prim_type = GEN6_3DPRIM_QUADSTRIP;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060081 break;
82 case XGL_TOPOLOGY_LINE_LIST_ADJ:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060083 pipeline->prim_type = GEN6_3DPRIM_LINELIST_ADJ;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060084 break;
85 case XGL_TOPOLOGY_LINE_STRIP_ADJ:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060086 pipeline->prim_type = GEN6_3DPRIM_LINESTRIP_ADJ;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060087 break;
88 case XGL_TOPOLOGY_TRIANGLE_LIST_ADJ:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060089 pipeline->prim_type = GEN6_3DPRIM_TRILIST_ADJ;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060090 break;
91 case XGL_TOPOLOGY_TRIANGLE_STRIP_ADJ:
Courtney Goeltzenleuchter8a3de592014-08-22 09:09:46 -060092 pipeline->prim_type = GEN6_3DPRIM_TRISTRIP_ADJ;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -060093 break;
94 case XGL_TOPOLOGY_PATCH:
95 // TODO: implement something here
96 break;
97 default:
98 return XGL_ERROR_BAD_PIPELINE_DATA;
99 }
100
101 if (ia_state->primitiveRestartEnable) {
102 pipeline->primitive_restart = true;
103 pipeline->primitive_restart_index = ia_state->primitiveRestartIndex;
104 } else {
105 pipeline->primitive_restart = false;
106 }
107
108 if (ia_state->disableVertexReuse) {
109 // TODO: What do we do to disable vertex reuse?
110 }
111
112 return XGL_SUCCESS;
113}
114
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600115static XGL_RESULT pipeline_rs_state(struct intel_dev *dev, struct intel_pipeline *pipeline,
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600116 const XGL_PIPELINE_RS_STATE_CREATE_INFO* rs_state)
117{
118 pipeline->depthClipEnable = rs_state->depthClipEnable;
119 pipeline->rasterizerDiscardEnable = rs_state->rasterizerDiscardEnable;
120 pipeline->pointSize = rs_state->pointSize;
121 return XGL_SUCCESS;
122}
123
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600124static void pipeline_destroy(struct intel_obj *obj)
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600125{
126 struct intel_pipeline *pipeline = intel_pipeline_from_obj(obj);
127
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600128 if (pipeline->active_shaders & SHADER_VERTEX_FLAG) {
129 icd_free(intel_shader(pipeline->intel_vs.pCode));
130 }
131 if (pipeline->active_shaders & SHADER_GEOMETRY_FLAG) {
132 icd_free(intel_shader(pipeline->gs.pCode));
133 }
134 if (pipeline->active_shaders & SHADER_FRAGMENT_FLAG) {
135 icd_free(intel_shader(pipeline->intel_fs.pCode));
136 }
137 if (pipeline->active_shaders & SHADER_TESS_CONTROL_FLAG) {
138 icd_free(intel_shader(pipeline->tess_control.pCode));
139 }
140 if (pipeline->active_shaders & SHADER_TESS_EVAL_FLAG) {
141 icd_free(intel_shader(pipeline->tess_eval.pCode));
142 }
143
Chia-I Wued833872014-08-23 17:00:35 +0800144 if (pipeline->vs_rmap)
145 intel_rmap_destroy(pipeline->vs_rmap);
146 if (pipeline->fs_rmap)
147 intel_rmap_destroy(pipeline->fs_rmap);
148
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600149 intel_base_destroy(&pipeline->obj.base);
150}
151
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600152static XGL_RESULT pipeline_get_info(struct intel_base *base, int type,
153 XGL_SIZE *size, XGL_VOID *data)
154{
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600155 // struct intel_pipeline *pipeline = intel_pipeline_from_base(base);
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600156 XGL_RESULT ret = XGL_SUCCESS;
157
158 switch (type) {
159 case XGL_INFO_TYPE_MEMORY_REQUIREMENTS:
160 {
161 XGL_MEMORY_REQUIREMENTS *mem_req = data;
162
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600163 /*
164 * For now, space for shaders will be allocated during command
165 * buffer processing.
166 */
167 mem_req->size = 0;
168 mem_req->heapCount = 0;
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600169 mem_req->heaps[0] = 0;
170
171 *size = sizeof(*mem_req);
172 }
173 break;
174 default:
175 ret = intel_base_get_info(base, type, size, data);
176 break;
177 }
178
179 return ret;
180}
181
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600182XGL_RESULT XGLAPI intelCreateGraphicsPipeline(
183 XGL_DEVICE device,
184 const XGL_GRAPHICS_PIPELINE_CREATE_INFO* pCreateInfo,
185 XGL_PIPELINE* pPipeline)
186{
187 union {
188 const void *ptr;
189 const struct {
190 XGL_STRUCTURE_TYPE struct_type;
191 XGL_VOID *next;
192 } *header;
193 const XGL_GRAPHICS_PIPELINE_CREATE_INFO* graphics_pipeline;
194 const XGL_PIPELINE_IA_STATE_CREATE_INFO* ia_state;
195 const XGL_PIPELINE_DB_STATE_CREATE_INFO* db_state;
196 const XGL_PIPELINE_CB_STATE* cb_state;
197 const XGL_PIPELINE_RS_STATE_CREATE_INFO* rs_state;
198 const XGL_PIPELINE_TESS_STATE_CREATE_INFO* tess_state;
199 const XGL_PIPELINE_SHADER_STAGE_CREATE_INFO* shader_state;
200 } info = { .ptr = pCreateInfo };
201 struct intel_dev *dev = intel_dev(device);
202 struct intel_pipeline *pipeline;
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600203 struct intel_shader *shader;
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600204 const XGL_PIPELINE_SHADER* shader_state;
205 void *shaderCode;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600206 XGL_RESULT result;
207
208 pipeline = (struct intel_pipeline *) intel_base_create(dev, sizeof(*pipeline),
209 dev->base.dbg, XGL_DBG_OBJECT_GRAPHICS_PIPELINE, pCreateInfo, 0);
210 if (!pipeline) {
211 return XGL_ERROR_OUT_OF_MEMORY;
212 }
213
214 pipeline->dev = dev;
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600215 pipeline->obj.destroy = pipeline_destroy;
216 pipeline->obj.base.get_info = pipeline_get_info;
217 pipeline->total_size = 0;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600218
219 do {
220 result = XGL_SUCCESS;
221
222 switch (info.header->struct_type) {
223 case XGL_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO:
224 // TODO: Should not see Compute Pipeline structs processing CreateGraphicsPipeline
225 return XGL_ERROR_BAD_PIPELINE_DATA;
226
227 case XGL_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO:
228 if (info.graphics_pipeline->flags & XGL_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT) {
229 // TODO: process disable optimization.
230 }
231 break;
232
233 case XGL_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO:
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600234 result = pipeline_ia_state(dev, pipeline, info.ia_state);
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600235 break;
236
237 case XGL_STRUCTURE_TYPE_PIPELINE_DB_STATE_CREATE_INFO:
238 pipeline->db_format = info.db_state->format;
239 break;
240
241 case XGL_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO:
242 pipeline->cb_state = *info.cb_state;
243 break;
244
245 case XGL_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO:
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600246 result = pipeline_rs_state(dev, pipeline, info.rs_state);
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600247 break;
248
249 case XGL_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO:
250 pipeline->tess_state = *info.tess_state;
251 break;
252
253 case XGL_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600254 shader_state = &info.shader_state->shader;
255 shader = intel_shader(shader_state->shader);
256
257 // TODO: process shader object and include in pipeline
258 // For now that processing is simply a copy so that the app
259 // can destroy the original shader object after pipeline creation.
Chia-I Wu9194a6d2014-08-28 11:36:48 +0800260 shaderCode = (void *) icd_alloc(shader->ir->size, 4, XGL_SYSTEM_ALLOC_INTERNAL_SHADER);
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600261 if (!shaderCode) {
262 result = XGL_ERROR_OUT_OF_MEMORY;
263 goto error_exit;
264 }
265
266 switch (shader_state->stage) {
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600267 case XGL_SHADER_STAGE_VERTEX:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600268 /*
269 * TODO: What should we do here?
270 * shader_state (XGL_PIPELINE_SHADER) contains links
271 * to application memory in the pLinkConstBufferInfo and
272 * it's pBufferData pointers. Do we need to bring all that
273 * into the driver or is it okay to rely on those references
274 * holding good data. In OpenGL we'd make a driver copy. Not
275 * as clear for XGL.
276 * For now, use the app pointers.
277 */
278 pipeline->vs = *shader_state;
279 pipeline->intel_vs.pCode = shaderCode;
Chia-I Wu9194a6d2014-08-28 11:36:48 +0800280 pipeline->intel_vs.codeSize = shader->ir->size;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600281 pipeline->active_shaders |= SHADER_VERTEX_FLAG;
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600282 pipeline->vs_rmap = intel_rmap_create(dev,
283 &shader_state->descriptorSetMapping[0],
284 &shader_state->dynamicMemoryViewMapping, 0);
285 if (!pipeline->vs_rmap) {
286 result = XGL_ERROR_OUT_OF_MEMORY;
287 goto error_exit;
288 }
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600289 break;
290 case XGL_SHADER_STAGE_GEOMETRY:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600291 pipeline->gs.pCode = shaderCode;
Chia-I Wu9194a6d2014-08-28 11:36:48 +0800292 pipeline->gs.codeSize = shader->ir->size;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600293 pipeline->active_shaders |= SHADER_GEOMETRY_FLAG;
294 break;
295 case XGL_SHADER_STAGE_FRAGMENT:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600296 pipeline->fs = *shader_state;
297 pipeline->intel_fs.pCode = shaderCode;
Chia-I Wu9194a6d2014-08-28 11:36:48 +0800298 pipeline->intel_fs.codeSize = shader->ir->size;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600299 pipeline->active_shaders |= SHADER_FRAGMENT_FLAG;
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600300 /* assuming one RT; need to parse the shader */
301 pipeline->fs_rmap = intel_rmap_create(dev,
302 &shader_state->descriptorSetMapping[0],
303 &shader_state->dynamicMemoryViewMapping, 1);
304 if (!pipeline->fs_rmap) {
305 result = XGL_ERROR_OUT_OF_MEMORY;
306 goto error_exit;
307 }
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600308 break;
309 case XGL_SHADER_STAGE_TESS_CONTROL:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600310 pipeline->tess_control.pCode = shaderCode;
Chia-I Wu9194a6d2014-08-28 11:36:48 +0800311 pipeline->tess_control.codeSize = shader->ir->size;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600312 pipeline->active_shaders |= SHADER_TESS_CONTROL_FLAG;
313 break;
314 case XGL_SHADER_STAGE_TESS_EVALUATION:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600315 pipeline->tess_eval.pCode = shaderCode;
Chia-I Wu9194a6d2014-08-28 11:36:48 +0800316 pipeline->tess_eval.codeSize = shader->ir->size;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600317 pipeline->active_shaders |= SHADER_TESS_EVAL_FLAG;
318 break;
319 case XGL_SHADER_STAGE_COMPUTE:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600320 pipeline->compute.pCode = shaderCode;
Chia-I Wu9194a6d2014-08-28 11:36:48 +0800321 pipeline->compute.codeSize = shader->ir->size;
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600322 pipeline->active_shaders |= SHADER_COMPUTE_FLAG;
323 break;
324 default:
325 // TODO: Log debug message
326 result = XGL_ERROR_BAD_PIPELINE_DATA;
327 goto error_exit;
328 }
329 break;
330
331 default:
332 // TODO: Log debug message
333 result = XGL_ERROR_BAD_PIPELINE_DATA;
334 goto error_exit;
335 }
336
337 if (result != XGL_SUCCESS) {
338 // TODO: What needs to happen if pipeline build fails?
339 goto error_exit;
340 }
341 info.ptr = info.header->next;
342 } while (info.ptr != NULL);
343
344 /*
345 * Validate required elements
346 */
347 if (!(pipeline->active_shaders & SHADER_VERTEX_FLAG)) {
348 // TODO: Log debug message: Vertex Shader required.
349 result = XGL_ERROR_BAD_PIPELINE_DATA;
350 goto error_exit;
351 }
352
353 /*
354 * Tessalation control and evaluation have to both have a shader defined or
355 * neither should have a shader defined.
356 */
357 if (((pipeline->active_shaders & SHADER_TESS_CONTROL_FLAG) == 0) !=
358 ((pipeline->active_shaders & SHADER_TESS_EVAL_FLAG) == 0) ) {
359 // TODO: Log debug message: Both Tess control and Tess eval are required to use tessalation
360 result = XGL_ERROR_BAD_PIPELINE_DATA;
361 goto error_exit;
362 }
363
364 if ((pipeline->active_shaders & SHADER_COMPUTE_FLAG) &&
365 (pipeline->active_shaders & (SHADER_VERTEX_FLAG | SHADER_TESS_CONTROL_FLAG |
366 SHADER_TESS_EVAL_FLAG | SHADER_GEOMETRY_FLAG |
367 SHADER_FRAGMENT_FLAG))) {
368 // TODO: Log debug message: Can only specify compute shader when doing compute
369 result = XGL_ERROR_BAD_PIPELINE_DATA;
370 goto error_exit;
371 }
372
373 /*
Courtney Goeltzenleuchter42509992014-08-21 17:33:46 -0600374 * XGL_TOPOLOGY_PATCH primitive topology is only valid for tessellation pipelines.
375 * Mismatching primitive topology and tessellation fails graphics pipeline creation.
376 */
377 if (pipeline->active_shaders & (SHADER_TESS_CONTROL_FLAG | SHADER_TESS_EVAL_FLAG) &&
378 (pipeline->ia_state.topology != XGL_TOPOLOGY_PATCH)) {
379 // TODO: Log debug message: Invalid topology used with tessalation shader.
380 result = XGL_ERROR_BAD_PIPELINE_DATA;
381 goto error_exit;
382 }
383
384 if ((pipeline->ia_state.topology == XGL_TOPOLOGY_PATCH) &&
385 (pipeline->active_shaders & ~(SHADER_TESS_CONTROL_FLAG | SHADER_TESS_EVAL_FLAG))) {
386 // TODO: Log debug message: Cannot use TOPOLOGY_PATCH on non-tessalation shader.
387 result = XGL_ERROR_BAD_PIPELINE_DATA;
388 goto error_exit;
389 }
390
391 /*
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600392 * Now compile everything into a pipeline object ready for the HW.
393 */
394
395 *pPipeline = pipeline;
396
397 return XGL_SUCCESS;
398
399error_exit:
Courtney Goeltzenleuchterd85c1d62014-08-27 14:04:53 -0600400 pipeline_destroy(&pipeline->obj);
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600401 return result;
402}
403
404XGL_RESULT XGLAPI intelCreateComputePipeline(
405 XGL_DEVICE device,
406 const XGL_COMPUTE_PIPELINE_CREATE_INFO* pCreateInfo,
407 XGL_PIPELINE* pPipeline)
408{
409 return XGL_ERROR_UNAVAILABLE;
410}
411
412XGL_RESULT XGLAPI intelStorePipeline(
413 XGL_PIPELINE pipeline,
414 XGL_SIZE* pDataSize,
415 XGL_VOID* pData)
416{
417 return XGL_ERROR_UNAVAILABLE;
418}
419
420XGL_RESULT XGLAPI intelLoadPipeline(
421 XGL_DEVICE device,
422 XGL_SIZE dataSize,
423 const XGL_VOID* pData,
424 XGL_PIPELINE* pPipeline)
425{
426 return XGL_ERROR_UNAVAILABLE;
427}
428
429XGL_RESULT XGLAPI intelCreatePipelineDelta(
430 XGL_DEVICE device,
431 XGL_PIPELINE p1,
432 XGL_PIPELINE p2,
433 XGL_PIPELINE_DELTA* delta)
434{
435 return XGL_ERROR_UNAVAILABLE;
436}