diff options
author | Kenneth Graunke <[email protected]> | 2018-01-30 02:44:25 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:05 -0800 |
commit | 9be4b3baafc7cb45806e35ec98f3bf65b0de078a (patch) | |
tree | 00e0b34c5502a4cdbd694f7d890e80228ed7e883 /src/gallium/drivers/iris | |
parent | db15993cfdd6e03435852d408e4fabaec642f297 (diff) |
iris: compctrl
oh, also run things
Diffstat (limited to 'src/gallium/drivers/iris')
-rw-r--r-- | src/gallium/drivers/iris/iris_batch.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 21 |
2 files changed, 20 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index e254863aef9..9d6b1715ea1 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -506,7 +506,7 @@ submit_batch(struct iris_batch *batch, int in_fence_fd, int *out_fence_fd) execbuf.flags |= I915_EXEC_FENCE_OUT; } -#if 0 +#if 1 int ret = drm_ioctl(batch->screen->fd, cmd, &execbuf); if (ret != 0) ret = -errno; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 48f62b13b0b..773ea358d42 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1310,12 +1310,29 @@ iris_create_vertex_elements(struct pipe_context *ctx, uint32_t *ve_pack_dest = &cso->vertex_elements[1]; for (int i = 0; i < count; i++) { + enum isl_format isl_format = + iris_isl_format_for_pipe_format(state[i].src_format); + unsigned comp[4] = { VFCOMP_STORE_SRC, VFCOMP_STORE_SRC, + VFCOMP_STORE_SRC, VFCOMP_STORE_SRC }; + + switch (isl_format_get_num_channels(isl_format)) { + case 0: comp[0] = VFCOMP_STORE_0; + case 1: comp[1] = VFCOMP_STORE_0; + case 2: comp[2] = VFCOMP_STORE_0; + case 3: + comp[3] = isl_format_has_int_channel(isl_format) ? VFCOMP_STORE_1_INT + : VFCOMP_STORE_1_FP; + break; + } iris_pack_state(GENX(VERTEX_ELEMENT_STATE), ve_pack_dest, ve) { ve.VertexBufferIndex = state[i].vertex_buffer_index; ve.Valid = true; ve.SourceElementOffset = state[i].src_offset; - ve.SourceElementFormat = - iris_isl_format_for_pipe_format(state[i].src_format); + ve.SourceElementFormat = isl_format; + ve.Component0Control = comp[0]; + ve.Component1Control = comp[1]; + ve.Component2Control = comp[2]; + ve.Component3Control = comp[3]; } iris_pack_command(GENX(3DSTATE_VF_INSTANCING), cso->vf_instancing[i], vi) { |