aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe.h
diff options
context:
space:
mode:
authorGlenn Kennard <[email protected]>2014-09-10 11:54:40 +0200
committerMarek Olšák <[email protected]>2014-10-12 23:53:57 +0200
commita327fa3a068af49bb7ae00a4b03abcb91906e0d2 (patch)
tree73099704bc1d26aab47982aaa80165e20028634d /src/gallium/drivers/r600/r600_pipe.h
parent75e97e2e3f317c79124116f596bdf0fde9f70ef8 (diff)
r600g: Implement GL_ARB_sample_shading
Also fixes two sided lighting which was broken at least on pre-evergreen by commit b1eb00. Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 2df168f01b5..fa9d34b0d71 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -52,6 +52,14 @@
#define R600_TXQ_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 1)
#define R600_BUFFER_INFO_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 2)
#define R600_GS_RING_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 3)
+/* Currently R600_MAX_CONST_BUFFERS is too large, the hardware only has 16 buffers, but the driver is
+ * trying to use 17. Avoid accidentally aliasing with user UBOs for SAMPLE_POSITIONS by using an id<16.
+ * UCP/SAMPLE_POSITIONS are never accessed by same shader stage so they can use the same id.
+ *
+ * Fixing this properly would require the driver to combine its buffers into a single hardware buffer,
+ * which would also allow supporting the d3d 11 mandated minimum of 15 user const buffers.
+ */
+#define R600_SAMPLE_POSITIONS_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS)
#define R600_MAX_CONST_BUFFER_SIZE (4096 * sizeof(float[4]))
@@ -452,6 +460,7 @@ struct r600_context {
bool force_blend_disable;
boolean dual_src_blend;
unsigned zwritemask;
+ int ps_iter_samples;
/* Index buffer. */
struct pipe_index_buffer index_buffer;
@@ -639,6 +648,7 @@ void r600_sampler_views_dirty(struct r600_context *rctx,
void r600_sampler_states_dirty(struct r600_context *rctx,
struct r600_sampler_states *state);
void r600_constant_buffers_dirty(struct r600_context *rctx, struct r600_constbuf_state *state);
+void r600_set_sample_locations_constant_buffer(struct r600_context *rctx);
uint32_t r600_translate_stencil_op(int s_op);
uint32_t r600_translate_fill(uint32_t func);
unsigned r600_tex_wrap(unsigned wrap);