Commit efe066e9 authored by Erik Faye-Lund 's avatar Erik Faye-Lund 💬
Browse files

d3d12: force 4-byte aligntment for vertex-buffer stride

In D3D12, we require 4-byte alignment when using half-float vertext
formats. It's not clear to me why, but the validator complains.

Sadly, we don't have a smaller hammer, so let's just always force 4-byte
alignment istead. It's not ideal, but it works. It makes us fallback to
u_vbuf.c all the time, which has some performance overhead.
parent 8f327d7c
......@@ -187,6 +187,7 @@ d3d12_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES:
case PIPE_CAP_VERTEX_SHADER_SATURATE:
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
return 1;
/* We need to do some lowering that requires a link to the sampler */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment